Skip to content

Commit

Permalink
Merge branch 'master' into add-getters-for-pricing-plan-and-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis authored Oct 18, 2023
2 parents c846194 + 11f0f2e commit fe88ab5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 64 deletions.
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ To achieve this, the platform will comprise both state-of-the art and highly det

## Getting Started

A production instance of **o<sup>2</sup>S<sup>2</sup>PARC** is running at [oSPARC.io](https://osparc.io).
A production instance of **o<sup>2</sup>S<sup>2</sup>PARC** is running at [oSPARC.io](https://osparc.io).

If you want to spin up your own instance, you can follow the common workflow to build and deploy locally using the **Linux commandline** (Ubuntu recommended).
If you want to spin up your own instance, you can follow the common workflow to build and deploy locally using the **Linux commandline** (Ubuntu recommended).
Make sure you first install all the [requirements](#Requirements) mentioned in the section below.

```bash
Expand All @@ -59,7 +59,7 @@ Make sure you first install all the [requirements](#Requirements) mentioned in t
#
xdg-open http://127.0.0.1.nip.io:9081/

# stops
# to stop the swarm
make down
```

Expand Down Expand Up @@ -139,10 +139,47 @@ To upgrade a single requirement named `fastapi`run:
- [Staging instructions](docs/releasing-workflow-instructions.md#staging-example)
- [User Manual](https://itisfoundation.github.io/osparc-manual/)

## Development build

For developers wanting to add/test code changes, a version can be built that will on-the-fly incorporate changes made in the source directory into the running containers.
To enable this, the following commands should be used to build, instead of the ones provided in the [Getting Started](#getting-started) section:

```bash
# clone code repository
git clone https://github.com/ITISFoundation/osparc-simcore.git
cd osparc-simcore

# setup python environment and activate
make devenv
source .venv/bin/activate

# show setup info and build core services
make info build build-devel

# starts swarm and deploys services
make up-devel

# The above command will keep in running with "[RUN] Running command..."
# Open another terminal session, to continue

# display swarm configuration
make info-swarm

# open front-end in the browser
# 127.0.0.1.nip.io:9081 - simcore front-end site
#
xdg-open http://127.0.0.1.nip.io:9081/

# to stop the swarm
make down
```

## Contributing

Would you like to make a change or add something new? Please read the [contributing guidelines](CONTRIBUTING.md).



## License

This project is licensed under the terms of the [MIT license](LICENSE).
Expand Down
32 changes: 3 additions & 29 deletions services/api-server/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,14 @@
# api-server

[![image-size]](https://microbadger.com/images/itisfoundation/api-server. "More on itisfoundation/api-server.:staging-latest image")
[![image-badge]](https://microbadger.com/images/itisfoundation/api-server "More on Public API Server image in registry")
[![image-version]](https://microbadger.com/images/itisfoundation/api-server "More on Public API Server image in registry")
[![image-commit]](https://microbadger.com/images/itisfoundation/api-server "More on Public API Server image in registry")

Platform's public API server

<!-- Add badges urls here-->
[image-size]:https://img.shields.io/microbadger/image-size/itisfoundation/api-server./staging-latest.svg?label=api-server.&style=flat
[image-badge]:https://images.microbadger.com/badges/image/itisfoundation/api-server.svg
[image-version]https://images.microbadger.com/badges/version/itisfoundation/api-server.svg
[image-commit]:https://images.microbadger.com/badges/commit/itisfoundation/api-server.svg
<!------------------------->

## Development

Setup environment

```cmd
make devenv
source .venv/bin/activate
cd services/api-server
make install-dev
```

Then

```cmd
make run-devel
```
Since the API server communicates with (almost) all other services, running it requires running the entire osparc (see the section [development build](../../README.md#development-build) of the main README)

will start the api-server in development-mode together with a postgres db initialized with test data. Open the following sites and use the test credentials ``user=key, password=secret`` to manually test the API:
Open the following sites and use the test credentials user=key, password=secret to manually test the API:

- http://127.0.0.1:8000/docs: redoc documentation
- http://127.0.0.1:8000/dev/docs: swagger type of documentation
http://127.0.0.1.nip.io:8006/dev/doc: swagger type of documentation

### Profiling requests to the api server
When in development mode (the environment variable `API_SERVER_DEV_FEATURES_ENABLED` is =1 in the running container) one can profile calls to the API server directly from the client side. On the server, the profiling is done using [Pyinstrument](https://github.com/joerick/pyinstrument). If we have our request in the form of a curl command, one simply adds the custom header `x-profile-api-server:true` to the command, in which case the profile is received under the `profile` key of the response body. This makes it easy to visualise the profiling report directly in bash:
Expand Down
34 changes: 2 additions & 32 deletions services/director-v2/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,8 @@
# director-v2

[![image-size]](https://microbadger.com/images/itisfoundation/director-v2 "More on itisfoundation/director-v2.:staging-latest image")

[![image-badge]](https://microbadger.com/images/itisfoundation/director-v2 "More on director-v2 image in registry")
[![image-version]](https://microbadger.com/images/itisfoundation/director-v2 "More on director-v2 image in registry")
[![image-commit]](https://microbadger.com/images/itisfoundation/director-v2 "More on director-v2 image in registry")

Director service in simcore stack

<!-- Add badges urls here-->
[image-size]:https://img.shields.io/microbadger/image-size/itisfoundation/director-v2./staging-latest.svg?label=director-v2.&style=flat
[image-badge]:https://images.microbadger.com/badges/image/itisfoundation/director-v2.svg
[image-version]https://images.microbadger.com/badges/version/itisfoundation/director-v2.svg
[image-commit]:https://images.microbadger.com/badges/commit/itisfoundation/director-v2.svg
<!------------------------->

## Development

Setup environment

```cmd
make devenv
source .venv/bin/activate
cd services/director-v2
make install-dev
make info
```

Then

```cmd
make run-devel
```

The latter will start the director-v2 service in development-mode together with a postgres db initialized with test data. Open the following sites and use the test credentials ``user=key, password=secret`` to manually test the API:

- http://127.0.0.1:8000/dev/doc: swagger type of documentation
Since services are often heavily interconnected, it's best to build and run the entire osparc repo in the development mode.
Instruction can be found in the [development build](../../README.md#development-build) section of the main README.

0 comments on commit fe88ab5

Please sign in to comment.