
Signed-off-by: Ruslan Aliev <raliev@mirantis.com> Change-Id: Ib2e666572fbe76bfa1ff542dd76e3c1d833e9268
110 lines
2.8 KiB
YAML
110 lines
2.8 KiB
YAML
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- hosts: primary
|
|
vars:
|
|
env:
|
|
HTTP_PROXY: ""
|
|
HTTPS_PROXY: ""
|
|
NO_PROXY: ""
|
|
PROMENADE_TMP_LOCAL: "cache"
|
|
DISTRO: "{{ distro }}"
|
|
become: true
|
|
|
|
tasks:
|
|
|
|
- name: Generate configuration files
|
|
shell: |
|
|
set -xe;
|
|
sysctl net.ipv4.conf.all.forwarding=1
|
|
sysctl net.ipv4.conf.all.rp_filter=1
|
|
args:
|
|
chdir: /root
|
|
executable: /bin/bash
|
|
environment: "{{env}}"
|
|
|
|
- name: Ensure pip
|
|
include_role:
|
|
name: ensure-pip
|
|
|
|
- name: Clear firewall
|
|
include_role:
|
|
name: clear-firewall
|
|
|
|
- name: Ensure docker
|
|
include_role:
|
|
name: ensure-docker
|
|
|
|
- name: Install resolvconf
|
|
command: apt-get install resolvconf -y
|
|
|
|
- name: Setup Apparmor
|
|
shell: |
|
|
set -xe;
|
|
./tools/deployment/apparmor/001-setup-apparmor-profiles.sh
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: List interfaces
|
|
command: ip addr show
|
|
|
|
- name: Generate configuration files
|
|
shell: |
|
|
set -xe;
|
|
./tools/dev-build.sh examples/containerd generate-certs replace {{ ansible_default_ipv4.interface }}
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
executable: /bin/bash
|
|
environment: "{{env}}"
|
|
|
|
- name: Generate certificate files
|
|
shell: |
|
|
set -xe;
|
|
./tools/dev-build.sh generate-certs
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
executable: /bin/bash
|
|
environment: "{{env}}"
|
|
|
|
- name: Copy build files and generated certificates to build-all
|
|
command: "mv {{ zuul.project.src_dir }}/build {{ zuul.project.src_dir }}/build-all"
|
|
|
|
- name: Build genesis script
|
|
shell: |
|
|
set -xe;
|
|
./tools/dev-build.sh build-all
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
executable: /bin/bash
|
|
environment: "{{env}}"
|
|
|
|
- name: Deploying genesis
|
|
shell: |
|
|
set -xe;
|
|
./build/genesis.sh
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Validating genesis
|
|
shell: |
|
|
set -xe;
|
|
./build/validate-genesis.sh
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}"
|
|
executable: /bin/bash
|
|
register: result
|
|
retries: 3
|
|
delay: 10
|
|
until: result.rc == 0
|