Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove kv stores from install.py #156

Merged
merged 6 commits into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ on:
env:
ETCDCTL_API: "3"
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python
ETCD_VERSION: "3.5.7"
GeorgianaElena marked this conversation as resolved.
Show resolved Hide resolved
CONSUL_VERSION: "1.14.4"

jobs:
# Run "pytest tests" for various Python versions
Expand Down Expand Up @@ -65,8 +67,15 @@ jobs:
run: |
pip install --upgrade setuptools pip
pip install -r dev-requirements.txt --upgrade .
python -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=./bin
python -m jupyterhub_traefik_proxy.install --output=./bin

pip freeze
- name: Install etcd, consul
run: |
curl -L https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip > consul.zip
unzip consul.zip -d ./bin consul
curl -L https://github.com/etcd-io/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz > etcd.tar.gz
tar -xzf etcd.tar.gz -C ./bin --strip-components=1 '*/etcd*'
consideRatio marked this conversation as resolved.
Show resolved Hide resolved

- name: Select tests
run: |
Expand Down
41 changes: 24 additions & 17 deletions docs/source/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,35 @@
python3 -m pip install jupyterhub-traefik-proxy
```

3. In order to be able to launch JupyterHub with traefik-proxy or run the tests, **traefik**, **etcd** and **consul** must first be installed and added to your `PATH`.
3. In order to be able to launch JupyterHub with traefik-proxy or run the tests, **traefik**, must first be installed and added to your `PATH`.

There are two ways you can install traefik, etcd and consul:
There are two ways you can install traefik:

1. Through traefik-proxy's **install utility**.

```
$ python3 -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=/usr/local/bin
$ python3 -m jupyterhub_traefik_proxy.install --output=/usr/local/bin
minrk marked this conversation as resolved.
Show resolved Hide resolved
```

This will install the default versions of traefik, etcd and consul, namely `traefik-1.7.5`, `etcd-3.3.10` and `consul_1.5.0` to `/usr/local/bin` specified through the `--output` option.
This will install `traefik`.

It is also possible to install the binaries individually. For example to install traefik only:

```
$ python3 -m jupyterhub_traefik_proxy.install --traefik --output=/usr/local/bin
```
This will install the default versions of traefik, to to `/usr/local/bin` specified through the `--output` option.

If no directory is passed to the installer, a *dependencies* directory will be created in the `traefik-proxy` directory. In this case, you **must** add this directory to `PATH`, e.g.

```
$ export PATH=$PATH:{$PWD}/dependencies
```

If you want to install other versions of traefik, etcd and consul in a directory of your choice, just specify it to the installer through the following arguments:
If you want to install other versions of traefik in a directory of your choice, just specify it to the installer through the following arguments:
* `--traefik-version`
* `--etcd-version`
* `--consul-version`
* `--output`

Example:

```
$ python3 -m jupyterhub_traefik_proxy.install --traefik --etcd --consul --output=dep \
--traefik-version=1.6.6 --etcd-version=3.2.24 --consul-version=1.5.0
$ python3 -m jupyterhub_traefik_proxy.install --output=dep \
--traefik-version=2.4.8
```

If the desired install directory doesn't exist, it will be created by the installer.
Expand All @@ -59,12 +53,25 @@
$ python3 -m jupyterhub_traefik_proxy.install --help
```

2. From traefik, etcd and consul **release pages**:
2. From traefik **release page**:
* Install [`traefik`](https://traefik.io/#easy-to-install)

* Install [`etcd`](https://github.com/etcd-io/etcd/releases)

* Install [`consul`](https://github.com/hashicorp/consul/releases)
## Installing a key-value store

If you want to use a key-value store to mediate configuration
(mainly for use in distributed deployments, such as containers),
you can get etcd or consul via their respective release pages:

* Install [`etcd`](https://github.com/etcd-io/etcd/releases)

* Install [`consul`](https://github.com/hashicorp/consul/releases)

Or, more likely, select the appropriate container image.
You will also need to install a Python client for the Key-Value store of your choice:

- `etcdpy`
- `python-consul2`

## Enabling traefik-proxy in JupyterHub

Expand Down
Loading