Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
FROM centos:7
FROM quay.io/centos/centos:stream8

RUN yum -y install git
RUN yum -y install epel-release
RUN yum -y install ansible
ARG foreman_url=https://foreman.example.com

RUN git clone https://github.com/redhat-performance/jetpack.git
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

ENTRYPOINT ansible-playbook jetpack/main.yml
RUN dnf install -y epel-release \
python3

RUN dnf install -y --skip-broken https://yum.theforeman.org/releases/2.1/el8/x86_64/foreman-release.rpm \
https://yum.theforeman.org/releases/2.1/el8/x86_64/rubygem-hammer_cli-2.1.0-1.el8.noarch.rpm \
http://yum.theforeman.org/releases/2.1/el8/x86_64/rubygem-hammer_cli_foreman-2.1.0-2.el8.noarch.rpm

RUN dnf install -y rubygem-hammer_cli \
rubygem-hammer_cli_foreman

RUN pip3 install j2cli

RUN hammer --fetch-ca-cert ${foreman_url}

COPY foreman.yml.j2 /root/
RUN j2 /root/foreman.yml.j2 > /etc/hammer/cli.modules.d/foreman.yml
6 changes: 3 additions & 3 deletions browbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
sed -i 's/dns_server: 8.8.8.8/dns_server: {{ dns_server.stdout }}/g' {{ browbeat_dir }}/ansible/install/group_vars/all.yml
- name: generate hosts file
shell: |
source /home/stack/stackrc
. /home/stack/stackrc
./generate_tripleo_inventory.sh -l
args:
chdir: "{{ browbeat_dir }}/ansible"
- name: install browbeat
shell: |
source /home/stack/.bash_profile
. /home/stack/.bash_profile
ansible-playbook -i hosts.yml install/browbeat.yml
args:
chdir: "{{ browbeat_dir }}/ansible"
- name: Activate virtualenv to run tests
shell: |
source .browbeat-venv/bin/activate
. .browbeat-venv/bin/activate
args:
chdir: "{{ browbeat_dir }}"
3 changes: 3 additions & 0 deletions hammer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ FROM quay.io/centos/centos:stream8

ARG foreman_url=https://foreman.example.com

RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN dnf install -y epel-release \
python3

Expand Down
4 changes: 2 additions & 2 deletions introspect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- block:
- name: run tripleo-overcloud introspection
shell: |
source .venv/bin/activate
. .venv/bin/activate
infrared tripleo-overcloud -vvv --version {{ osp_release }} {{ custom_instackenv | default('') }} --deployment-files {{ nic_configs }} --introspect yes {{ hybrid_params | default('') }} > {{ log_directory }}/overcloud_introspect.log 2>&1
args:
chdir: "{{ infrared_dir }}"
Expand All @@ -27,7 +27,7 @@
- block:
- name: run tripleo-overcloud introspection
shell: |
source .venv/bin/activate
. .venv/bin/activate
infrared tripleo-overcloud -vvv --version {{ osp_release }} {{ custom_instackenv | default('') }} --deployment-files {{ nic_configs }} --introspect yes {{ hybrid_params | default('') }} > {{ log_directory }}/overcloud_introspect.log 2>&1
args:
chdir: "{{ infrared_dir }}"
Expand Down
2 changes: 1 addition & 1 deletion overcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@

- name: run tripleo-overcloud deploy
shell: |
source .venv/bin/activate
. .venv/bin/activate
infrared tripleo-overcloud -vvv --version {{ osp_release }} --deployment-timeout {{ deployment_timeout | default(240) }} --build {{ osp_puddle }} --deployment-files {{ nic_configs }} --introspect no --tagging no --deploy yes --controller-nodes {{ controller_count }} --compute-nodes {{ compute_count }} --storage-nodes {{ ceph_node_count }} --overcloud-image-name full {{ oc_extra_templates }} {{ dvr_params | default('') }} --network-protocol ipv4 --network-backend {{ network_backend }} {{ network_type }} true {{ ceph_params | default('') }} {{ storage_protocol_backend | default('') }} --ntp-server {{ gateway }} --public-network false {{ oc_heat_configs | default('') }} {{ oc_config_resource | default('') }} > {{ log_directory }}/overcloud_deploy.log 2>&1
args:
chdir: "{{ infrared_dir }}"
2 changes: 1 addition & 1 deletion scale_compute_vms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

- name: run virsh for multi hypervisor
shell: |
source .venv/bin/activate
. .venv/bin/activate
infrared virsh {{ host_address }} --host-key {{ ansible_ssh_key }} --topology-nodes compute:{{ compute_count|default(1) }} --topology-network {{ topology_network_path }} --host-memory-overcommit True > {{ log_directory }}/virsh.log 2>&1
args:
chdir: "{{ infrared_dir }}"
Expand Down
2 changes: 1 addition & 1 deletion scale_compute_vms_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

- name: run virsh for multi hypervisor
shell: |
source .venv/bin/activate
. .venv/bin/activate
echo infrared virsh {{ host_address }} --host-key {{ ansible_ssh_key }} --topology-nodes compute:{{ compute_count|default(1) }} --topology-network {{ topology_network_path }} --host-memory-overcommit True > {{ log_directory }}/virsh.log 2>&1
args:
chdir: "{{ infrared_dir }}"
Expand Down
2 changes: 1 addition & 1 deletion tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

- name: run tripleo-overcloud tagging
shell: |
source .venv/bin/activate
. .venv/bin/activate
infrared tripleo-overcloud -vvv --version {{ osp_release }} --deployment-files {{ nic_configs }} --introspect no --tagging yes > {{ log_directory }}/overcloud_tagging.log 2>&1
args:
chdir: "{{ infrared_dir }}"
Expand Down
5 changes: 3 additions & 2 deletions tasks/load_instackenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@

- name: Download instackenv.json
get_url:
url: "{{ alias.lab_url }}/cloud/{{ cloud_name }}_instackenv.json"
url: "{{ alias.lab_url }}/instack/{{ cloud_name }}_instackenv.json"
dest: "{{ instackenv_file }}"
mode: '0644'
force: yes
when: st.stat.exists == False and lab_name == "alias"

- name: Download instackenv.json
get_url:
url: "{{ scale.lab_url }}/cloud/{{ cloud_name }}_instackenv.json"
url: "{{ scale.lab_url }}/instack/{{ cloud_name }}_instackenv.json"
dest: "{{ instackenv_file }}"
mode: '0644'
force: yes
validate_certs: no
when: st.stat.exists == False and lab_name == "scale"

- name: remove the name field from instackenv
Expand Down
6 changes: 3 additions & 3 deletions tasks/setup_infrared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

- name: infrared setup
shell: |
virtualenv --python=python3 .venv && source .venv/bin/activate
python3 -m venv .venv && . .venv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
pip install .
Expand All @@ -24,7 +24,7 @@
changed_when: false

- name: add infrared plugins
shell: source .venv/bin/activate && infrared plugin add all
shell: . .venv/bin/activate && infrared plugin add all
args:
chdir: "{{ infrared_dir }}"
register: plugin_add
Expand All @@ -35,7 +35,7 @@

- name: Create infrared workspace
shell: |
source .venv/bin/activate
. .venv/bin/activate
infrared workspace create {{ workspace_name }}
infrared workspace checkout {{ workspace_name }}
args:
Expand Down
4 changes: 2 additions & 2 deletions undercloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
when: osp_release|int < 17
- name: run tripleo-undercloud for osp17
shell: |
source {{ infrared_dir }}/.venv/bin/activate
. {{ infrared_dir }}/.venv/bin/activate
infrared tripleo-undercloud -vv \
--version {{ osp_release }} \
--build {{ osp_puddle }} \
Expand All @@ -98,7 +98,7 @@

- name: Run the undercloud-ipa-install.yml playbook
shell: |
source /home/stack/.bash_profile
. /home/stack/.bash_profile
ansible-playbook --ssh-extra-args "-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" /usr/share/ansible/tripleo-playbooks/undercloud-ipa-install.yaml
when: tls_everywhere == true
delegate_to: undercloud
Expand Down
4 changes: 2 additions & 2 deletions virtual_undercloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

- name: clean previous vm
shell: |
source {{ infrared_dir }}/.venv/bin/activate
. {{ infrared_dir }}/.venv/bin/activate
infrared virsh --host-address 127.0.0.1 --host-key /root/.ssh/id_rsa --image-url '{{ image_url }}' --topology-network virtual_uc_network --topology-nodes virtual_uc_topology:1 --host-memory-overcommit True --cleanup True
retries: 3
ignore_errors: yes

- name: create undercloud vm
shell: |
source {{ infrared_dir }}/.venv/bin/activate
. {{ infrared_dir }}/.venv/bin/activate
infrared virsh --host-address 127.0.0.1 --host-key /root/.ssh/id_rsa --image-url '{{ image_url }}' --topology-network virtual_uc_network --topology-nodes virtual_uc_topology:1 --host-memory-overcommit True -vvv 2>&1 | tee log_virsh1


Expand Down