Skip to content

Commit

Permalink
Merge pull request CentOS-PaaS-SIG#1722 from JunqiZhang0/add-ocp
Browse files Browse the repository at this point in the history
Merged by Jenkins
  • Loading branch information
cp-bot committed May 1, 2020
2 parents 86b65fa + dda892c commit 789f592
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/source/examples/workspaces/openstack-ocp/PinFile
@@ -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 docs/source/examples/workspaces/openstack-ocp/install.yaml
@@ -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


13 changes: 13 additions & 0 deletions docs/source/examples/workspaces/openstack-ocp/ocp-run.yml
@@ -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 docs/source/examples/workspaces/openstack-ocp/run_tests.yml
@@ -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

0 comments on commit 789f592

Please sign in to comment.