Commit f385fa8f authored by Muhammad Umair Khan's avatar Muhammad Umair Khan
Browse files

Fix Ansible playbook setup and build issues (#30)

parent 0c6efabf
Loading
Loading
Loading
Loading
+1 −0
Changes for .gitignore: 1 added line, 0 removed lines.
Original line number Original line Diff line number Diff line
@@ -7,3 +7,4 @@ vendor/
dist/
dist/
bin
bin
examples/demo1/bin
examples/demo1/bin
playbooks/ansible-venv/
+1 −1
Changes for charts/meep-app-enablement/values-template.yaml: 1 added line, 1 removed line.
Original line number Original line Diff line number Diff line
@@ -100,7 +100,7 @@ prometheus:
    interval: 10s
    interval: 10s
    additionalLabels: {}
    additionalLabels: {}
    relabelings: []
    relabelings: []
    scrapeTimeout: 5s
    scrapeTimeout: 15s
    
    
codecov:
codecov:
  enabled: false
  enabled: false
+2 −2
Changes for go-apps/meep-iot-pltf/meep-acme-mn-cse/acme.ini.in: 2 added lines, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -44,8 +44,8 @@ allowedCSROriginators=/*


[cse.registrar]
[cse.registrar]
INCSEcseID=/$REMOTE_CSE_ID
INCSEcseID=/$REMOTE_CSE_ID
;address=https://${basic.config:registrarCseHost}:${basic.config:registrarCsePort}/
address=https://${basic.config:registrarCseHost}:${basic.config:registrarCsePort}/
;root=$REMOTE_SVC_PATH
root=$REMOTE_SVC_PATH


[textui]
[textui]
startWithTUI=false
startWithTUI=false
+1 −2
Changes for playbooks/inventories/dev/group_vars/all.yml: 1 added line, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -36,7 +36,6 @@ docker_repo_arch: >-
    else ansible_facts['architecture']
    else ansible_facts['architecture']
  }}
  }}
docker_repo_codename: "{{ ansible_facts['lsb']['codename'] | default('jammy') }}"
docker_repo_codename: "{{ ansible_facts['lsb']['codename'] | default('jammy') }}"
docker_version: "5:29.2.1-1~ubuntu.{{ ansible_distribution_version }}~{{ docker_repo_codename }}" # Docker Version




# Kubernetes
# Kubernetes
@@ -64,7 +63,7 @@ helm_version: "v3.14.4"


# Development environment (optional role)
# Development environment (optional role)
install_dev_env: true
install_dev_env: true
go_version: "1.17"
go_version: "1.25.0"
go_tar: "go{{ go_version }}.linux-amd64.tar.gz"
go_tar: "go{{ go_version }}.linux-amd64.tar.gz"
go_url: "https://go.dev/dl/go{{ go_version }}.linux-amd64.tar.gz"
go_url: "https://go.dev/dl/go{{ go_version }}.linux-amd64.tar.gz"
node_major: 20
node_major: 20
+20 −2
Changes for playbooks/roles/dev_env/golang/tasks/install.yml: 20 added lines, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -12,18 +12,36 @@
  changed_when: false
  changed_when: false
  when: go_binary.stat.exists
  when: go_binary.stat.exists


- name: Download Go tarball
- name: Copy local Go tarball to /tmp if it exists
  copy:
    src: "{{ mec_sandbox_dir }}/go{{ go_version }}.linux-amd64.tar.gz"
    dest: "/tmp/go{{ go_version }}.linux-amd64.tar.gz"
    remote_src: true
    mode: "0644"
  register: local_go_tarball
  ignore_errors: true
  when: not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")

- name: Download Go tarball if local copy not found
  get_url:
  get_url:
    url: "https://go.dev/dl/go{{ go_version }}.linux-amd64.tar.gz"
    url: "https://go.dev/dl/go{{ go_version }}.linux-amd64.tar.gz"
    dest: "/tmp/go{{ go_version }}.linux-amd64.tar.gz"
    dest: "/tmp/go{{ go_version }}.linux-amd64.tar.gz"
    mode: "0644"
    mode: "0644"
  when: (not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")) and (local_go_tarball is failed or local_go_tarball is skipped)

# Step 2: Remove old /usr/local/go and extract new one
- name: Remove old Go directory
  file:
    path: /usr/local/go
    state: absent
  become: true
  when: not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")
  when: not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")


# Step 2: Extract to /usr/local
- name: Extract Go tarball to /usr/local
- name: Extract Go tarball to /usr/local
  shell: "tar -C /usr/local -xzf /tmp/go{{ go_version }}.linux-amd64.tar.gz"
  shell: "tar -C /usr/local -xzf /tmp/go{{ go_version }}.linux-amd64.tar.gz"
  args:
  args:
    executable: /bin/bash
    executable: /bin/bash
  become: true
  when: not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")
  when: not go_binary.stat.exists or go_version_output.stdout is not search("go{{ go_version }}")


# Step 3: Create ~/gocode/bin directory
# Step 3: Create ~/gocode/bin directory
Loading