forked from CentOS-PaaS-SIG/linchpin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request CentOS-PaaS-SIG#1722 from JunqiZhang0/add-ocp
Merged by Jenkins
- Loading branch information
Showing
4 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
os-server-new: | ||
hooks: | ||
postup: | ||
- name: install_linchpin | ||
type: ansible | ||
context: True | ||
actions: | ||
- playbook: install.yaml | ||
- playbook: run_tests.yml | ||
topology: | ||
topology_name: os-server-new | ||
resource_groups: | ||
- resource_group_name: os-server-new | ||
resource_group_type: openstack | ||
resource_definitions: | ||
- name: "test-linchpin1" | ||
role: os_server | ||
flavor: {{ flavor | default('ci.nested.virt.m1.small') }} | ||
image: {{ image | default('Fedora 31') }} | ||
count: 1 | ||
keypair: {{ keypair | default('OCP') }} | ||
networks: | ||
- {{ networks | default('provider_net_cci_8') }} | ||
credentials: | ||
filename: clouds.yaml | ||
profile: test | ||
|
||
layout: | ||
inventory_layout: | ||
vars: | ||
hostname: __IP__ | ||
ansible_ssh_user: fedora | ||
ansible_ssh_private_key_file: './OCP.pem' | ||
ansible_ssh_extra_args: '"-o identitiesOnly=yes -o StrictHostKeyChecking=no"' | ||
hosts: | ||
OCP-test-node: | ||
count: 1 | ||
host_groups: | ||
- test |
43 changes: 43 additions & 0 deletions
43
docs/source/examples/workspaces/openstack-ocp/install.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
- hosts: all | ||
gather_facts: no | ||
become: false | ||
tasks: | ||
- name: Install git | ||
shell: sudo yum install git -y | ||
- name: Git clone | ||
git: | ||
repo: 'https://github.com/JunqiZhang0/linchpin.git' | ||
dest: '~/linchpin' | ||
- name: Install python | ||
shell: sudo yum install python3 -y | ||
args: | ||
chdir: ~/linchpin/ | ||
- name: Install pip | ||
shell: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
args: | ||
chdir: ~/linchpin/ | ||
- name: Install pip | ||
shell: sudo python3 get-pip.py | ||
args: | ||
chdir: ~/linchpin/ | ||
- name: Install gcc | ||
shell: sudo yum install gcc -y | ||
- name: Install python devel | ||
shell: sudo yum install python3-devel -y | ||
#yum install gcc | ||
# yum install python3-devel | ||
#yum install libvirt | ||
# sudo pip install linchpin[libvirt] | ||
- name: checkout | ||
shell: git checkout add-ocp | ||
args: | ||
chdir: ~/linchpin/ | ||
- name: Install linchpin | ||
shell: sudo pip install . | ||
args: | ||
chdir: ~/linchpin/ | ||
- name: linchpin version | ||
shell: sudo /usr/local/bin/linchpin --version | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#jinja2:lstrip_blocks: True | ||
--- | ||
libvirt-network: | ||
topology: libvirt-network.yml | ||
|
||
cfgs: | ||
libvirt: | ||
__IP__: name | ||
__ADDRESS__: ip | ||
|
||
libvirt-new: | ||
topology: libvirt-new.yml | ||
layout: libvirt-new.yml |
38 changes: 38 additions & 0 deletions
38
docs/source/examples/workspaces/openstack-ocp/run_tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#jinja2:lstrip_blocks: True | ||
--- | ||
- hosts: all | ||
gather_facts: no | ||
become: false | ||
tasks: | ||
- name: intall libvirt | ||
shell: sudo yum install libvirt -y | ||
- name: Start libvirtd | ||
shell: sudo systemctl start libvirtd | ||
- name: install selinux | ||
shell: sudo pip install selinux | ||
- name: Install dependency | ||
shell: sudo yum install -y libvirt-devel libguestfs-tools python-libguestfs | ||
- name: Install linchpin[libvirt] | ||
shell: sudo pip install linchpin[libvirt] | ||
- name: clone testing repo | ||
shell: git -c http.sslVerify=false clone https://gitlab.cee.redhat.com/ocp-edge-qe/ocp-edge.git | ||
args: | ||
chdir: ~/ | ||
- name: init test workplace | ||
shell: /usr/local/bin/linchpin init ocpusecase | ||
args: | ||
chdir: ~/ | ||
- name: Copy Pinfile | ||
shell: sudo cp ~/linchpin/docs/source/examples/workspaces/openstack-ocp/ocp-run.yml ~/ocpusecase/ | ||
- name: make dir | ||
shell: sudo mkdir -p ~/ocpusecase/topologies/ ~/ocpusecase/layouts/ | ||
- name: Copy file linvirt-new topo | ||
shell: sudo cp ~/ocp-edge/linchpin-workspace/topologies/libvirt-new.yml ~/ocpusecase/topologies/ | ||
- name: Copy file linvirt-new layout | ||
shell: sudo cp ~/ocp-edge/linchpin-workspace/layouts/libvirt-new.yml ~/ocpusecase/layouts/ | ||
- name: Copy file linvirt-network topo | ||
shell: sudo cp ~/ocp-edge/linchpin-workspace/topologies/libvirt-network.yml ~/ocpusecase/topologies/ | ||
- name: run tests | ||
shell: sudo /usr/local/bin/linchpin -vvv -p ocp-run.yml up | ||
args: | ||
chdir: ~/ocpusecase |