Skip to content
Open

oks #22

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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "submodules/openstack-zuul-jobs"]
path = submodules/openstack-zuul-jobs
url = https://opendev.org/openstack/openstack-zuul-jobs
[submodule "submodules/sf-infra"]
path = submodules/sf-infra
url = https://github.com/softwarefactory-project/sf-infra
66 changes: 66 additions & 0 deletions ansible/deploy_oks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
- name: basic setup
hosts: all
roles:
- ensure_stack_user
- prepare_dev_tools



- name: set selinux permissive
hosts: all
tasks:
- name: selinux
become: true
selinux:
policy: targeted
state: permissive

- name: deploy openshift
hosts: microshift.dev
tags: ocp
vars:
fqdn: microshift.dev
use_copr_microshift: false
setup_olm: true
openshift_pull_secret: "{{ lookup('file', pull_secret_path) }}"
roles:
- extra/microshift

- name: clone install yamls
hosts: openshift
tags: ospo
roles:
- ensure_install_yamls
- ensure_kustomize

- name: disable image signing checks
hosts: microshift.dev
tasks:
- name: copy /etc/containers/policy.json
become: true
ansible.builtin.copy:
content: |
{
"default": [
{
"type": "insecureAcceptAnything"
}
],
"transports": {
"docker-daemon": {
"": [
{
"type": "insecureAcceptAnything"
}
]
}
}
}
dest: /etc/containers/policy.json

- name: finalize
hosts: all
roles:
- print_debug_ip

1 change: 1 addition & 0 deletions ansible/roles/deploy_install_yamls
23 changes: 23 additions & 0 deletions molecule/oks/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
*********************************
Vagrant driver installation guide
*********************************

Requirements
============

* Vagrant
* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop

Install
=======

Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.

.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site

.. code-block:: bash

$ pip install 'molecule_vagrant'
5 changes: 5 additions & 0 deletions molecule/oks/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: "execute deploy shift-stack"
import_playbook: ../../ansible/deploy_oks.yaml
vars:
pull_secret_path: "../../../pull-secret"
36 changes: 36 additions & 0 deletions molecule/oks/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
dependency:
name: galaxy
driver:
name: vagrant
provider:
name: libvirt
provision: no
parallel: true
default_box: 'generic/centos9s'
platforms:
- name: microshift.dev
memory: 20480
cpus: 8
provider_options:
cpu_mode: 'host-passthrough'
nested: true
machine_type: 'q35'
groups:
- openshift
- name: nova-compute-1
memory: 8192
cpus: 8
provider_options:
cpu_mode: 'host-passthrough'
nested: true
machine_type: 'q35'
groups:
- openstack
provisioner:
name: ansible
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:../../submodules/zuul-jobs/roles:../../submodules/sf-infra/roles"
verifier:
name: ansible
10 changes: 10 additions & 0 deletions molecule/oks/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
assert:
that: true
1 change: 1 addition & 0 deletions submodules/sf-infra
Submodule sf-infra added at d00546