Mentions légales du service

Skip to content
Snippets Groups Projects
R

reference_implementation

Project ID: 54031
SAUCEZ Damien's avatar
SAUCEZ Damien authored
Fixes for running the master branch on the UTH nodes

See merge request !2
54bdf2b4
History

Deploy the environment

Deployment node

sudo apt install docker.io

If there is no id_rsa file, create it with the following command:

ssh-keygen -t rsa

Then copy the .pub file to the $HOME/.ssh/authorized_hosts of all the nodes that will be managed by the deployment container

cat $HOME/.ssh/id_rsa.pub

To build the deployment container:

docker build -t deployment_node -f Dockerfile .
docker run --rm -it -v "$(pwd)":/blueprint -v ${HOME}/.ssh/id_rsa:/private_key deployment_node

Create secrets file

We recommand to encryp the secrets file, for that, we use Ansible vault. To create the file and vault it, use the following command:

EDITOR=nano ansible-vault edit secrets.yaml

In this secret file you have to define

secrets:
  prometheus_basic_auth_password: REDACTED
  grafana_password: REDACTED

This will create the encrypted file secrets.yaml that we can use later to access to critical data.

deploy the monitoring collector

ansible-playbook -i inventories/staging --extra-vars "@params.yaml" --extra-vars "@secrets.yaml" --ask-vault-pass lpg.yaml 

If you don't want to type the vault password, you can write you vault password in a file (e.g., a_password_file) and get it from there by replacing --ask-vault-pass by --vault-id dev@a_password_file.

deploy the cluster

ansible-playbook -i inventories/staging --extra-vars "@params.yaml" --extra-vars "@secrets.yaml" --ask-vault-pass k8s-cluster.yaml 

Deploy 5G network

ansible-playbook -i inventories/staging --extra-vars "@params.yaml" --extra-vars "@params.5g.yaml" --extra-vars "@secrets.yaml" --ask-vault-pass 5g.yaml