Donal Spring
2018-05-21 9543475e3607c49f2d7d5b889cf35a639ed76fde
commit | author | age
62813b 1 # Open Innovation Labs Enablement CI/CD Exercise
D 2
3 Repository hosts the Labs Enablement material. It is a working skeleton that learners will use in conjunction with the [enablement-docs](https://github.com/rht-labs/enablement-docs).
4
5 ### Basic usage
6
7 1. Clone this repository.
8 1. Log on to an OpenShift server `oc login -u <user> https://<server>:<port>/`
04eacd 9 1. Install the required [openshift-applier](https://github.com/redhat-cop/openshift-applier) dependency:
62813b 10 ```bash
D 11 ansible-galaxy install -r requirements.yml --roles-path=roles
12 ```
c9eb0a 13 1. Run the play book using this to create projects and roles
62813b 14 ```bash
c9eb0a 15 ansible-playbook apply.yml -i inventory/ -e target=bootstrap
D 16 ```
17 1. Run the play book using this to create projects and roles
18 ```bash
19 ansible-playbook apply.yml -i inventory/ -e target=tools
62813b 20 ```
D 21
22 ## Running a Subset of the Inventory
23
24 2. See [the docs](https://github.com/redhat-cop/casl-ansible/tree/master/roles/openshift-applier#filtering-content-based-on-tags) in casl-ansible
25 2. The only required tag to deploy objects within the inventory is **projects**, all other tags are *optional*
26 2. Here is an example that runs the tags that provision projects, ci, and jenkins objects:
27 ```bash
c9eb0a 28 ansible-playbook apply.yml -e target=tools \
62813b 29      -i inventory/ \
c9eb0a 30      -e "filter_tags=jenkins,ci,projects"
62813b 31 ```