Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard committed Jan 5, 2024
1 parent 2e83310 commit 45efc06
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 77 deletions.
16 changes: 0 additions & 16 deletions src/docs/development.stories.mdx

This file was deleted.

85 changes: 42 additions & 43 deletions src/docs/markdown/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Application configuration

The configuration for conda-store-ui, including the connection details to conda-store, can be done :
- either at compile time, using a `.env` file.
- or at runtime, using `condaStoreConfig` variable

- either at compile time, using a `.env` file
- or at runtime, using `condaStoreConfig` variable

### At compile time, using `.env`

Expand All @@ -27,94 +27,93 @@ REACT_APP_LOGOUT_PAGE_URL=http://localhost:8080/conda-store/logout?next=/
### At runtime, using `condaStoreConfig`

When using a webpacked version of `conda-store-ui`, you might want to pass it a configuration.
In your HTML file, add the following **before** loading the react app :
In your HTML file, add the following **before** loading the React app :

```html
<script>
const condaStoreConfig = {
REACT_APP_AUTH_METHOD: "cookie",
REACT_APP_AUTH_TOKEN: "",
REACT_APP_STYLE_TYPE: "green-accent",
REACT_APP_SHOW_AUTH_BUTTON: "true",
REACT_APP_API_URL: "http://localhost:8080/conda-store",
REACT_APP_LOGIN_PAGE_URL: "http://localhost:8080/conda-store/login?next=",
REACT_APP_LOGOUT_PAGE_URL: "http://localhost:8080/conda-store/logout?next=/",
};
const condaStoreConfig = {
REACT_APP_AUTH_METHOD: "cookie",
REACT_APP_AUTH_TOKEN: "",
REACT_APP_STYLE_TYPE: "green-accent",
REACT_APP_SHOW_AUTH_BUTTON: "true",
REACT_APP_API_URL: "http://localhost:8080/conda-store",
REACT_APP_LOGIN_PAGE_URL: "http://localhost:8080/conda-store/login?next=",
REACT_APP_LOGOUT_PAGE_URL: "http://localhost:8080/conda-store/logout?next=/"
};
</script>
```


### Options

The possible options are stored in a key-value format.

| Key | Value |
|--------------------|--------|
|`REACT_APP_API_URL` | string |
| Key | Value |
| ------------------- | ------ |
| `REACT_APP_API_URL` | string |

Base API url that will be used when creating RTK Query queries
Base API URL that will be used when creating RTK Query queries

| Key | Value |
|------------------------|--------|
|`REACT_APP_AUTH_METHOD` | string |
| Key | Value |
| ----------------------- | ------ |
| `REACT_APP_AUTH_METHOD` | string |

Preferred method of authentication.

Options:

* `cookie`
- `cookie`

Lets users authenticate by logging into `conda-store`. This is the preferred method of authentication.

* `token`
- `token`

Lets users utilize a token generated by `conda-store` to authenticate to the server.

| Key | Value |
|---------------------------|--------|
|`REACT_APP_LOGIN_PAGE_URL` | string |
| Key | Value |
| -------------------------- | ------ |
| `REACT_APP_LOGIN_PAGE_URL` | string |

The URL endpoint used for login authentication.

| Key | Value |
|----------------------------|--------|
|`REACT_APP_LOGOUT_PAGE_URL` | string |
| Key | Value |
| --------------------------- | ------ |
| `REACT_APP_LOGOUT_PAGE_URL` | string |

The URL endpoint used for logout authentication.

| Key | Value |
|------------------------|--------------------|
|`REACT_APP_AUTH_TOKEN` | `null` / `string` |
| Key | Value |
| ---------------------- | ----------------- |
| `REACT_APP_AUTH_TOKEN` | `null` / `string` |

If using the `token` method for authentication, then input the token as a string.
Otherwise, leave blank.

| Key | Value |
|---------------------------|--------|
|`REACT_APP_STYLE_TYPE` | string |
| Key | Value |
| ---------------------- | ------ |
| `REACT_APP_STYLE_TYPE` | string |

Options:

* `grayscale`
- `grayscale`

* `green-accent`
- `green-accent`

| Key | Value |
|----------------------------|--------|
|`REACT_APP_SHOW_AUTH_BUTTON`| bool |
| Key | Value |
| ---------------------------- | ----- |
| `REACT_APP_SHOW_AUTH_BUTTON` | bool |

Options:

* `true`
- `true`

Show the login icon in the top menubar.

* `false`
- `false`

Hide the login icon in the top menubar.

## Docker-compose configuration
By default, docker-compose uses the latest release of conda-store-server, but there could be cases where a devloper wishes to test against a different versions, such as a release candidate.

Adding the `CONDA_STORE_SERVER_VERSION` variable to the `.env` file will allow overriding this default and setting whichever version of conda-store-server is desired.
By default, docker-compose uses the latest release of conda-store-server, but there could be cases where a developer wishes to test against a different version, such as a release candidate.

Adding the `CONDA_STORE_SERVER_VERSION` variable to the `.env` file will allow overriding this default and setting whichever version of conda-store-server is desired.
24 changes: 12 additions & 12 deletions src/docs/markdown/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

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.

## Prerequsites
Before setting up conda-store ui, you must prepare your environment.
## Prerequisites

We use [Docker Compose](https://docs.docker.com/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 [installlation documentation](https://docs.docker.com/compose/install/)
Before setting up conda-store-ui, you must prepare your environment.

We use [Docker Compose](https://docs.docker.com/compose/) to set up the infrastructure before starting to ensure that you have docker-compose installed. If you need to install docker-compose, please see their [installlation documentation](https://docs.docker.com/compose/install/)

1. Clone the [conda-store-ui](https://github.com/conda-incubator/conda-store-ui.git) repository.
2. Copy `.env.example` to `.env`. All default settings should work, but if you want to test against a differenct version of conda-store-server, you can specify if in the `.env` file by setting the `CONDA_STORE_SERVER_VERSION` variable to the desired version
2. 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 the `CONDA_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 setup your local development environment.

Running conda-store-ui in Docker is the simplest way to set up your local development environment.

1. Run `yarn run start:docker` to start the entire development stack.
2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui.
3. You can then login using the default username of `username` and default password of `password`.
Open your local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui.
1. You can then log in using the default username of `username` and default password of `password`.

**Note:** Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes.

Expand All @@ -26,6 +28,7 @@ This setup still uses Docker for supporting services but runs conda-store-ui loc
### Set up your environment

This project uses [Conda](https://conda.io) for package management. To set up Conda, please see their [installation documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html).

1. Change to the project root ` cd conda-store-ui`
2. From the project root create the conda environment `conda env create -f environment_dev.yml`
3. Activate the development environment `conda activate cs-ui-dev-env`
Expand All @@ -34,10 +37,7 @@ This project uses [Conda](https://conda.io) for package management. To set up Co
### Run the application

1. Run `yarn run start` and wait for the application to finish starting up
2. Open you local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui.
3. You can then login using the default username of `username` and default password of `password`.
2. Open your local browser and go to [http://localhost:8000](http://localhost:8000) so see conda-store-ui.
3. You can then log in using the default username of `username` and default password of `password`.

**Note:** Hot reloading is enabled, so when you make changes to source files, your browser will reload and reflect the changes.



8 changes: 4 additions & 4 deletions src/docs/markdown/INTRODUCTION.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Introduction

Welcome to the conda-store-ui project documentation! conda-store-ui is a frontend for conda-store, allowing interaction with environments through its interface.
Welcome to the conda-store-ui project documentation! conda-store-ui is a frontend for conda-store, allowing interaction with environments through its interface.

As a pre-requiste, you will need to have access to a running instance of conda-store.
As a pre-requisite, you will need to have access to a running instance of conda-store.

If you'd like to check conda-store out first, visit [conda.store](https://conda.store/en/latest)

## Docs

The Documentation for the application, its features, and its usage can be found here.
The Documentation for the application, its features, and its usage can be found here.

## Features

These are the components that `conda-store-ui` is built on, and provides a playground for these pieces.
These are the components that `conda-store-ui` is built on and provides a playground for these pieces.
4 changes: 2 additions & 2 deletions src/docs/markdown/START.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Hello, welcome to our getting started guide! This guide will help you to get `co

## Local Deployment

For a local deployment, we recommend that you use our provided docker compose file. The docker compose file contains _both_ conda-store-ui and conda-store-server, so it is perfect for a playground!
For local deployment, we recommend that you use our provided docker-compose file. The docker-compose file contains _both_ conda-store-ui and conda-store-server, so it is perfect for a playground!

------------------------
---

### 1) Clone the repository and `cd` into the root

Expand Down

0 comments on commit 45efc06

Please sign in to comment.