Contribute code
This page is in active development, content may be inaccurate and incomplete.
Set up development environment - conda-store-core
Docker (recommended)
Install the following dependencies before developing on conda-store.
To deploy conda-store
run the following command
docker-compose up --build -d
Many of the conda-store docker images are built/tested for amd64(x86-64)
there will be a performance impact when building and running on
arm architectures. Otherwise, this workflow has been shown to run and build on OSX.
Notice the architecture: amd64
within the docker-compose.yaml
files.
The following resources will be available:
Resource | Localhost port | username | password |
---|---|---|---|
conda-store web server | localhost:8080 | admin | password |
JupyterHub | localhost:8000 | any | test |
MinIO S3 | localhost:9000 | admin | password |
PostgreSQL (database: conda-store ) | localhost:5432 | admin | password |
Redis | localhost:6379 | - | password |
On a fast machine this deployment should only take 10 or so seconds assuming the docker images have been partially built before.
If you are making any changes to conda-store-server
and would like to see
those changes in the deployment, run:
docker-compose down -v # not always necessary
docker-compose up --build
Linux
-
Install the following dependencies before developing on conda-store:
-
Install the development dependencies and activate the environment:
# replace this with environment-macos-dev.yaml or environment-windows-dev.yaml
# if you are on Mac or Windows
conda env create -f conda-store-server/environment-dev.yaml
conda activate conda-store-server-dev
-
Running
conda-store
in--standalone
mode launches celery as a subprocess of the web server.python -m conda_store_server.server --standalone
-
Visit localhost:8080
Set up development environment -- conda-store-ui
To get started with conda-store-ui development, there are a couple of options. This guide will help you to set up your local development environment.
Prerequisites
Before setting up conda-store-ui, you must prepare your environment.
We use Docker Compose to set up the infrastructure before starting ensure that you have docker-compose installed. If you need to install docker-compose, please see their installation documentation
- Clone the conda-store-ui repository.
- Copy
.env.example
to.env
. All default settings should work, but if you want to test against a different version of conda-store-server, you can specify it in the.env
file by setting theCONDA_STORE_SERVER_VERSION
variable to the desired version
Local Development with conda-store-ui running in Docker
Running conda-store-ui in Docker is the simplest way to set up your local development environment.
- Run
yarn run start:docker
to start the entire development stack. Open your local browser and go to http://localhost:8000 so see conda-store-ui. - You can then log in using the default username of
username
and default password ofpassword
.
Note: Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes.
Local Development without running conda-store-ui in Docker
This setup still uses Docker for supporting services but runs conda-store-ui locally.
Set up your environment
This project uses Conda for package management. To set up Conda, please see their installation documentation.
- Change to the project root
cd conda-store-ui
- From the project root create the conda environment
conda env create -f environment_dev.yml
- Activate the development environment
conda activate cs-ui-dev-env
- Install yarn dependencies
yarn install
Run the application
- Run
yarn run start
and wait for the application to finish starting up Open your local browser and go to http://localhost:8000 so see conda-store-ui. - You can then log in using the default username of
username
and default password ofpassword
.
Note: Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes.
Workflows
Changes to API
The REST API is considered somewhat stable. If any changes are made to
the API make sure the update the OpenAPI/Swagger specification in
docs/_static/openapi.json
. This may be downloaded from the /docs
endpoint when running conda-store. Ensure that the
c.CondaStoreServer.url_prefix
is set to /
when generating the
endpoints.
Workflows
Changes to API
The REST API is considered somewhat stable. If any changes are made to
the API make sure the update the OpenAPI/Swagger specification in
docs/_static/openapi.json
. This may be downloaded from the /docs
endpoint when running conda-store. Ensure that the
c.CondaStoreServer.url_prefix
is set to /
when generating the
endpoints.