Skip to content

Commit

Permalink
docs: update layout
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0Vu committed Jul 4, 2022
1 parent b723636 commit 156b05e
Showing 1 changed file with 40 additions and 52 deletions.
92 changes: 40 additions & 52 deletions docs/docs/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ Ensure that you have both docker and python installed on your system.

#### Prequisite
* docker

https://www.docker.com/
https://www.docker.com/

* python

https://www.python.org
https://www.python.org

#### Steps
* Clone Meson repository
Expand All @@ -24,67 +22,57 @@ $ git clone https://github.com/hashcloak/Meson.git
```

* Build containers for Meson networks

You'll build these containers after execute this script: Katzenmint pki and Meson server:

```
$ python plugin/ops/build_containers.py
```
You'll build these containers after execute this script: Katzenmint pki and Meson server:
```
$ python plugin/ops/build_containers.py
```

* Start testnet

You can start Meson testnet on local computer after building containers:

```
$ cd testnet/local
$ docker compose up
```
You can start Meson testnet on local computer after building containers:
```
$ cd testnet/local
$ docker compose up
```

5. Execute ping test

Try our integration test (ping):

```
$ cd ping
$ go run main.go -s echo
```
Try our integration test (ping):
```
$ cd ping
$ go run main.go -s echo
```

### Deploy to Remote Network

#### Prequisite
* terraform

https://www.terraform.io/
https://www.terraform.io/

* ansible

https://www.ansible.com/
https://www.ansible.com/

* added ssh public key in Digital Ocean

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/
https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/

#### Services

* Meson mix services

repo: https://github.com/hashcloak/Meson
* create droplets on Digital Ocean
* go to `docker/remote/terraform`
* apply terraform config`terraform apply -var DO_API_TOKEN="$DO_API_TOKEN" -var SSH_KEY_FILE="$SSH_KEY_FILE"`
* remove droplets on Digital Ocean
* go to `docker/remote/terraform`
* `terraform destroy -var DO_API_TOKEN="$DO_API_TOKEN" -var SSH_KEY_FILE="$SSH_KEY_FILE"`
> if you want to remove specific droplet, added -target: -target="module.cluster.digitalocean_droplet.cluster[3]"
* katzenmint-pki
* go to `docker/remote/ansible`
* install the service `ansible-playbook -i inventory/digital_ocean.py -l sentrynet install.yml`
* upload config and binary `ansible-playbook -i inventory/digital_ocean.py -l sentrynet config.yml -e CONFIGDIR=/path/to/config/directory -e BINARY=/path/to/binary`
* mix
* go to `docker/remote/ansible`
* install the service `ansible-playbook -i inventory/digital_ocean.py -l mixnet install.yml`
* upload config and binary `ansible-playbook -i inventory/digital_ocean.py -l mixnet config.yml -e CONFIGDIR=/path/to/config/directory -e BINARY=/path/to/binary`
* provider
* go to `docker/remote/ansible`
* install the service `ansible-playbook -i inventory/digital_ocean.py -l providernet install.yml`
* upload config and binary `ansible-playbook -i inventory/digital_ocean.py -l providernet config.yml -e CONFIGDIR=/path/to/config/directory -e BINARYDIR=/path/to/binary/directory`
##### Meson mix services

* create droplets on Digital Ocean
* go to `docker/remote/terraform`
* apply terraform config`terraform apply -var DO_API_TOKEN="$DO_API_TOKEN" -var SSH_KEY_FILE="$SSH_KEY_FILE"`
* remove droplets on Digital Ocean
* go to `docker/remote/terraform`
* `terraform destroy -var DO_API_TOKEN="$DO_API_TOKEN" -var SSH_KEY_FILE="$SSH_KEY_FILE"`
> if you want to remove specific droplet, added -target: -target="module.cluster.digitalocean_droplet.cluster[3]"
* katzenmint-pki
* go to `docker/remote/ansible`
* install the service `ansible-playbook -i inventory/digital_ocean.py -l sentrynet install.yml`
* upload config and binary `ansible-playbook -i inventory/digital_ocean.py -l sentrynet config.yml -e CONFIGDIR=/path/to/config/directory -e BINARY=/path/to/binary`
* mix
* go to `docker/remote/ansible`
* install the service `ansible-playbook -i inventory/digital_ocean.py -l mixnet install.yml`
* upload config and binary `ansible-playbook -i inventory/digital_ocean.py -l mixnet config.yml -e CONFIGDIR=/path/to/config/directory -e BINARY=/path/to/binary`
* provider
* go to `docker/remote/ansible`
* install the service `ansible-playbook -i inventory/digital_ocean.py -l providernet install.yml`
* upload config and binary `ansible-playbook -i inventory/digital_ocean.py -l providernet config.yml -e CONFIGDIR=/path/to/config/directory -e BINARYDIR=/path/to/binary/directory`

0 comments on commit 156b05e

Please sign in to comment.