X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=packer%2Fprovision%2Flocal-docker.yaml;h=1bdb5f78facd5e1be59826bccd6e226e8d7ce489;hb=1610dcb16e8e7ec13233d709a9b0a39b8a460e13;hp=7b9f9c0c64e6e0ce0a9a2a31f9114145d3d0b82c;hpb=f39b3498d24302506a4eae32565b10248d9a3d6c;p=ci-management.git diff --git a/packer/provision/local-docker.yaml b/packer/provision/local-docker.yaml index 7b9f9c0c6..1bdb5f78f 100644 --- a/packer/provision/local-docker.yaml +++ b/packer/provision/local-docker.yaml @@ -6,10 +6,11 @@ become_method: sudo vars: apt_file: /etc/apt/sources.list.d/google-chrome.list - docker_compose_version: 1.17.1 + docker_compose_version: 1.29.2 glide_checksum: sha256:c403933503ea40308ecfadcff581ff0dc3190c57958808bb9eed016f13f6f32c glide_version: v0.13.1 golang_version: 1.9.1 + npm_version: "6.14.13" tasks: - name: "Checking for x86_64" @@ -60,9 +61,14 @@ become: true when: ansible_distribution == 'Ubuntu' - - name: Install python-tox + - name: Install python-tox and deps pip: - name: tox + name: + - tox + - tox-pyenv + - virtualenv + - more-itertools~=5.0.0 + - zipp==1.0.0 state: present become: true @@ -74,7 +80,7 @@ - name: Update and upgrade apt packages apt: - upgrade: yes + upgrade: 'yes' update_cache: yes become: true when: ansible_distribution == 'Ubuntu' @@ -88,6 +94,7 @@ - libssl-dev - libmysqlclient-dev - gcc + - python3-venv become: true when: ansible_distribution == 'Ubuntu' @@ -100,7 +107,52 @@ become: true when: ansible_distribution == 'Ubuntu' - - name: Install base packages + - name: Install Python 3.8 + apt: + name: + - python3.8 + - python3.8-dev + - python3.8-tk + become: true + when: ansible_distribution == 'Ubuntu' + + - name: Install Python 3.9 + apt: + name: + - python3.9 + - python3.9-dev + - python3.9-tk + - python3.9-distutils + become: true + when: ansible_distribution == 'Ubuntu' + + - name: Install nodejs-dev libssl1.0-dev dep + apt: + name: + - libssl1.0-dev + update_cache: yes + state: fixed + become: true + when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04' + + - name: Install nodejs-dev dep for npm + apt: + name: + - nodejs-dev + update_cache: yes + state: fixed + become: true + when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04' + + - name: Install libnode-dev dep for npm + apt: + name: libnode-dev + update_cache: yes + state: fixed + become: true + when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04' + + - name: Install supporting packages (Ubuntu 18.04) apt: name: - unzip @@ -108,22 +160,65 @@ - libxml-xpath-perl - wget - make - - npm - sshuttle - netcat - libssl-dev - libffi-dev + - xmlstarlet + - xvfb + - crudini + - maven + - python-ncclient + update_cache: yes + state: fixed become: true - when: ansible_distribution == 'Ubuntu' + when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '18.04' - - name: Install autorelease support packages + - name: Install supporting packages (Ubuntu 20.04) apt: name: + - unzip + - xz-utils + - libxml-xpath-perl + - wget + - make + - sshuttle + - netcat + - libssl-dev + - libffi-dev - xmlstarlet - xvfb - crudini - maven - - python-ncclient + - python3-ncclient + update_cache: yes + state: fixed + become: true + when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04' + + - name: Install npm and addon packages + apt: + name: + - nodejs + - npm + - node-gyp + update_cache: yes + state: fixed + become: true + when: ansible_distribution == 'Ubuntu' + + - name: npm self-update + command: npm install npm@{{ npm_version }} -g + become: true + when: ansible_distribution == 'Ubuntu' + + - name: npm install n module + command: npm install n -g + become: true + when: ansible_distribution == 'Ubuntu' + + - name: Upgrade latest stable node version + command: n stable | PATH="$PATH" become: true when: ansible_distribution == 'Ubuntu' @@ -166,31 +261,15 @@ become: true when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' - - name: Clone rebar3 - git: - repo: 'https://github.com/erlang/rebar3.git' - dest: /tmp/rebar3 - when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' - - - name: Bootstrap rebar3 - command: ./bootstrap - args: - chdir: /tmp/rebar3 - when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' - - - name: Install rebar3 to bin - copy: - src: /tmp/rebar3/rebar3 - dest: /usr/bin/rebar3 - mode: 0755 - remote_src: true + - name: 'Download latest rebar3 bin' + command: curl -o /usr/bin/rebar3 -L "https://s3.amazonaws.com/rebar3/rebar3" become: true when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' - - name: Remove unused rebar3 source - file: - path: /tmp/rebar3 - state: absent + - file: + path: /usr/bin/rebar3 + mode: "+x" + become: true when: ansible_architecture == 'x86_64' and ansible_distribution == 'Ubuntu' - name: Download geckodriver