Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

re-org: Move openshift deployment to playbooks dir #84

Merged
merged 1 commit into from
Feb 22, 2018

Conversation

gbenhaim
Copy link
Contributor

  • Custom variables per Openshift version can be declared under
    playbooks/cluster/openshift/vars/

  • Use a static version for Openshift 3.9 (v3.9.0-alpha.4)

  • Renamed deploy-openshift.yml to config.yml.

  • Added the prerequisites of openshift to config.yml - there is no
    reason to keep them in a separate file.

Signed-off-by: gbenhaim galbh2@gmail.com

@gbenhaim
Copy link
Contributor Author

If you think that this change is ok, I will also send a PR for updating the docs.

state: stopped
enabled: no
name: firewalld
failed_when: "result|failed and not 'Could not find the requested service' in result.msg"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will not result|failed be enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in case that firewalld is not installed, the result|failed is true, but we don't care because firewalld is not installed.

- name: Load openshift facts
openshift_facts:
role: common

- name: Set facts for docker-storage-setup
block:
- name: Detecting Operating System from ostree_booted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Detecting/Detect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


- name: install epel repository
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Copy link
Contributor

@alexxa alexxa Feb 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@gbenhaim gbenhaim Feb 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module that you have pasted should be used when you want to manually configure a repository. In our case, we use a release RPM.


- name: install epel repository
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Copy link
Contributor

@alexxa alexxa Feb 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- sos
- psacct
- docker

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deployed a cluster using the standard CentOS image from https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2

To get openshift-ansible to run, I had to install:
yum-utils ansible wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct docker sshpass NetworkManager centos-release-openshift-origin.noarch ceph-common docker centos-release-openshift iptables-utils NetworkManager atomic-openshift-utils

And ensure NetworkManager is started and enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prerequisites that don't appear here (such as NetworkManager, and centos-release-openshift) are being cared as part of the openshift-ansible modules.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't work for me until I manually installed them before running deploy_cluster.yml

@@ -1,3 +1,3 @@
- import_playbook: "{{ playbook_dir }}/deploy-with-{{ provider | default('lago') }}.yml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move all playbooks (including control.yml) under playbooks dir

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will be done in the following patches.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to do the entire re-org in one patch because it makes the code review overwhelming.

@gbenhaim gbenhaim force-pushed the re_org_part_1 branch 2 times, most recently from e143ee9 to 8d0fa57 Compare February 22, 2018 13:36
- "{{ playbook_dir }}/vars/{{ openshift_ver }}.yml"

- name: set SELinux to permissive mode
command: setenforce 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is setting to enforcing mode. Did you mean setenforce 0? Or is the text wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, I'll fix it.

- name: set SELinux to permissive mode
command: setenforce 1

- name: set SELinux to permissive mode under configuration file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you run this without become: true?

Copy link
Contributor Author

@gbenhaim gbenhaim Feb 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see at the top of the playbook that we use remote_user: root.
If you think that we should use become, we can do it a different PR.

- Custom variables per Openshift version can be declared under
  playbooks/cluster/openshift/vars/

- Use a static version for Openshift 3.9 (v3.9.0-alpha.4)

- Rename deploy-openshift.yml to config.yml.

- Add the prerequisites of openshift to config.yml - there is no
  reason to keep them in a separate file.

- Add a global variable file at vars/global_vars.yml

Signed-off-by: gbenhaim <galbh2@gmail.com>
@gbenhaim
Copy link
Contributor Author

@rthallisey I've fixed the selinux configuration.

@gbenhaim gbenhaim merged commit 72b540d into kubevirt:master Feb 22, 2018
@lukas-bednar
Copy link
Contributor

This change is not reflected in README, and made it outdated, please try to keep readme uptodate.
#88

@gbenhaim gbenhaim mentioned this pull request Feb 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants