diff --git a/README.md b/README.md index 052b118be1d5bc975ed42887c7736bc48bba30e2..1cb094753b1f96abeab05870bd6df0f38e11f6e3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,23 @@ ## Deployment node +```console +sudo apt install docker.io +``` + +If there is no id_rsa file, create it with the following command: + +```console +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: + ```console docker build -t deployment_node -f Dockerfile . ``` @@ -47,4 +64,4 @@ ansible-playbook -i inventories/staging --extra-vars "@params.yaml" --extra-vars ## Deploy 5G network ```console ansible-playbook -i inventories/staging --extra-vars "@params.yaml" --extra-vars "@params.5g.yaml" --extra-vars "@secrets.yaml" --ask-vault-pass 5g.yaml -``` \ No newline at end of file +``` diff --git a/lpg.yaml b/lpg.yaml index 4a840cf452311b62aa2f9dc4ed2e6cf23fb55919..67c2a58cfc534de49c5454544313a233bd732fe6 100644 --- a/lpg.yaml +++ b/lpg.yaml @@ -4,7 +4,8 @@ prometheus_basic_auth_password: "{{ secrets['prometheus_basic_auth_password'] }}" grafana_password: "{{ secrets['grafana_password'] }}" roles: + - docker/tasks - grafana-loki-prometheus/prometheus - grafana-loki-prometheus/loki - grafana-loki-prometheus/grafana - \ No newline at end of file + diff --git a/roles/5g/base/files/gen_oai.py b/roles/5g/base/files/gen_oai.py index de2b4581e6804e0eacb66d5eaae9aa65bda6a98d..a5b6d38f07204a22f4e8422e9613e130156bde18 100644 --- a/roles/5g/base/files/gen_oai.py +++ b/roles/5g/base/files/gen_oai.py @@ -134,7 +134,7 @@ def render(templatepath, gcn): # ============================================================================== # load configurations -with open('roles/5g/templates/manifest.yaml', "r") as file: +with open('roles/5g/base/templates/manifest.yaml', "r") as file: tpls = yaml.safe_load(file) core = yaml.safe_load(os.environ['params_5g']) @@ -157,4 +157,4 @@ for item in tpls["templates"]: content = render(path, gcn) else: content = readFile("/".join([tpls["output_dir"], path ])) - createFile(content, item['output']) \ No newline at end of file + createFile(content, item['output']) diff --git a/roles/5g/base/tasks/main.yaml b/roles/5g/base/tasks/main.yaml index ca6a7dcb4de7fd940d98e0b4ce2ae8d5b3ade51e..664e3f682d08813a95f883ca19f6b6b0b31e2d0e 100644 --- a/roles/5g/base/tasks/main.yaml +++ b/roles/5g/base/tasks/main.yaml @@ -10,8 +10,8 @@ args: chdir: oai-cn5g-fed - - name: generate OAI files - ansible.builtin.shell: python3 roles/5g/files/gen_oai.py + - name: generate OAI files + ansible.builtin.shell: python3 roles/5g/base/files/gen_oai.py environment: params_5g: GCN: '{{ GCN }}' @@ -39,4 +39,4 @@ # # Deploy the UE # - name: Deploy the UE # ansible.builtin.include_tasks: 'ue.yaml' -# when: GCN.UE is defined and GCN.UE.present \ No newline at end of file +# when: GCN.UE is defined and GCN.UE.present diff --git a/roles/5g/base/templates/manifest.yaml b/roles/5g/base/templates/manifest.yaml index 1907319a74ee99d1603eaf30b4d58a820c802ef7..a21c55925264c21292a7496ad7ca7d55b1e6e9fb 100644 --- a/roles/5g/base/templates/manifest.yaml +++ b/roles/5g/base/templates/manifest.yaml @@ -1,4 +1,4 @@ -output_dir: roles/5g/templates/oai-cn5g-fed/charts +output_dir: roles/5g/base/templates/oai-cn5g-fed/charts templates: - template: oai-5g-core/oai-5g-basic/config.yaml.j2 output: ./oai-cn5g-fed/charts/oai-5g-core/oai-5g-basic/config.yaml @@ -22,4 +22,4 @@ templates: - template: oai-5g-ran/oai-gnb/templates/configmap.yaml output: ./oai-cn5g-fed/charts/oai-5g-ran/oai-gnb/templates/configmap.yaml - template: oai-5g-ran/oai-gnb/templates/deployment.yaml - output: ./oai-cn5g-fed/charts/oai-5g-ran/oai-gnb/templates/deployment.yaml \ No newline at end of file + output: ./oai-cn5g-fed/charts/oai-5g-ran/oai-gnb/templates/deployment.yaml diff --git a/roles/post-5g-bp-cluster-monitoring/cadvisor/templates/cadvisor.yaml.j2 b/roles/post-5g-bp-cluster-monitoring/cadvisor/templates/cadvisor.yaml.j2 index 3827fdd4d54f4cc0536785fd71a820dadcdf2a45..4c9eb3f671636c365531225a67e445d96b12f2be 100644 --- a/roles/post-5g-bp-cluster-monitoring/cadvisor/templates/cadvisor.yaml.j2 +++ b/roles/post-5g-bp-cluster-monitoring/cadvisor/templates/cadvisor.yaml.j2 @@ -21,11 +21,11 @@ spec: - containerPort: 8080 resources: limits: - cpu: 200m - memory: 200Mi + cpu: 300m + memory: 400Mi requests: - cpu: 100m - memory: 100Mi + cpu: 150m + memory: 200Mi volumeMounts: - name: rootfs mountPath: /rootfs