|
|
|
@@ -6,39 +6,8 @@ CIC-CLI provides tooling to generate and publish metadata in relation to
|
|
|
|
|
token deployments.
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
pip install --extra-index-url https://pip.grassrootseconomics.net cic[eth]
|
|
|
|
|
pip install cic-cli[eth]
|
|
|
|
|
```
|
|
|
|
|
## Setup
|
|
|
|
|
### Requirements
|
|
|
|
|
- Install [poetry](https://python-poetry.org/docs/#installation)
|
|
|
|
|
<details>
|
|
|
|
|
<summary>Install Kubectl</summary>
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y apt-transport-https ca-certificates curl
|
|
|
|
|
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
|
|
|
|
|
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y kubectl
|
|
|
|
|
```
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
### Deploy to the testnet
|
|
|
|
|
|
|
|
|
|
- Download testnet cluster config from https://cloud.digitalocean.com/kubernetes/clusters
|
|
|
|
|
- Move the config to `$HOME/.kube/`
|
|
|
|
|
- Run `kubectl -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml get pods`
|
|
|
|
|
- Copy the name of the meta pod (e.g `cic-meta-server-67dc7c6468-8rhdq`)
|
|
|
|
|
- Port foward the meta pod to the local machine using `kubectl port-forward pods/<name_of_meta_pod> 6700:8000 -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml`
|
|
|
|
|
- Clone this repository to your local machine
|
|
|
|
|
- Run `poetry install -E eth` in the repo root
|
|
|
|
|
- Open `./config/testnet/config.ini` and change
|
|
|
|
|
- [auth]keyfile_path
|
|
|
|
|
- [wallet]key_file
|
|
|
|
|
- Open a new terminal and run `poetry run cic wizard -c ./config/testnet ./somewhere`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
### Using the wizard
|
|
|
|
|
```
|
|
|
|
@@ -76,6 +45,8 @@ state of the package contains interface to EVM only. Thus, the examples
|
|
|
|
|
below are limited to the context of the EVM.
|
|
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
### Requirements
|
|
|
|
|
- Install [poetry](https://python-poetry.org/docs/#installation)
|
|
|
|
|
|
|
|
|
|
### Setup
|
|
|
|
|
|
|
|
|
@@ -97,6 +68,31 @@ below are limited to the context of the EVM.
|
|
|
|
|
- Save the private key to a file
|
|
|
|
|
- Run `eth-keyfile -k <file> > ~/.config/cic/keystore/keyfile.json`
|
|
|
|
|
|
|
|
|
|
### Port Forwarding
|
|
|
|
|
<details>
|
|
|
|
|
<summary>Install Kubectl</summary>
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y apt-transport-https ca-certificates curl
|
|
|
|
|
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
|
|
|
|
|
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y kubectl
|
|
|
|
|
```
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
- Download testnet cluster config from https://cloud.digitalocean.com/kubernetes/clusters
|
|
|
|
|
- Move the config to `$HOME/.kube/`
|
|
|
|
|
- Run `kubectl -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml get pods`
|
|
|
|
|
- Copy the name of the meta pod (e.g `cic-meta-server-67dc7c6468-8rhdq`)
|
|
|
|
|
- Port foward the meta pod to the local machine using `kubectl port-forward pods/<name_of_meta_pod> 6700:8000 -n grassroots --kubeconfig=$HOME/.kube/<config_file_name>.yaml`
|
|
|
|
|
- Clone this repository to your local machine
|
|
|
|
|
- Run `poetry install -E eth` in the repo root
|
|
|
|
|
- Open `./config/testnet/config.ini` and change
|
|
|
|
|
- [auth]keyfile_path
|
|
|
|
|
- [wallet]key_file
|
|
|
|
|
- Open a new terminal and run `poetry run cic wizard -c ./config/testnet ./somewhere`
|
|
|
|
|
### Tests
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|