Skip to content

Instantly share code, notes, and snippets.

View dav1x's full-sized avatar

Davis Phillips dav1x

  • Red Hat
  • Austin, TX
View GitHub Profile
<p class="p1">While validating OpenShift Container Platform on a VMware platform the usage of Atomic OS was also a requirement. In the initial reference architecture, the decision was made to use Red Hat Enterprise Linux as the platform. This platform was then customized and the same packages as in Atomic were installed via Ansible and Red Hat Network.<!--more--></p>
<p class="p1">The github repo with those playbooks is here:</p>
<p class="p3"><a href="https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/vmware-ansible">https://github.com/openshift/openshift-ansible-contrib/tree/master/reference-architecture/vmware-ansible</a><span class="s1">.</span></p>
<p class="p1">These playbooks will guide you from start to finish to deploying OCP on VMware vCenter utilizing RHEL 7.</p>
<p class="p1">The next step in the VMware platform was to prepare a Dockerfile that would suffice in providing the privileges required for VMware’s open-vm-tools to a container running on the Atomic O
---
### Red Hat Virtualization Engine Connection
engine_url: https://engine.example.com/ovirt-engine/api
engine_user: admin@internal
engine_password: changeme
# CA file copied from engine:/etc/pki/ovirt-engine/ca.pem; path is relative to playbook directory
#engine_cafile: ../ca.pem
### Red Hat Virtualization VM Image
## For CentOS 7:
---
- block:
- name: create a partition on sdb
parted:
device: /dev/sdb
number: 1
state: present
- name: format device
filesystem:
---
- block:
- name: create the docker-storage config file
template:
src: "{{ role_path }}/templates/docker-storage-setup-overlayfs.j2"
dest: /etc/sysconfig/docker-storage-setup
owner: root
group: root
mode: 0644
- name: Retrieve the OpenShift Pool ID
command: subscription-manager list --available --matches="{{ rhel_subscription_pool }}" --pool-only
register: openshift_pool_id
changed_when: False
- name: Determine if OpenShift Pool Already Attached
command: subscription-manager list --consumed --matches="{{ rhel_subscription_pool }}" --pool-only
register: openshift_pool_attached
changed_when: False
when: openshift_pool_id.stdout == ''
if not cluster_id:
#create a unique cluster_id first
cluster_id = ''.join(random.choice('0123456789ABCDEF') for i in range(20))
config.set('vmware', 'cluster_id', cluster_id)
for line in fileinput.input(vmware_ini_path, inplace=True):
if line.startswith('cluster_id'):
print "cluster_id=" + str(cluster_id)
else:
print line,
- name: Create openshift volume group
lvg: vg=etcd pvs=/dev/sdd
- name: Create lvm volumes
lvol: vg=etcd lv=etcd size=95%FREE state=present shrink=no
- name: Create local partition on lvm lv
filesystem:
fstype: xfs
dev: /dev/etcd/etcd
---
- hosts: localhost
gather_facts: yes
ignore_errors: yes
vars_files:
- vars/main.yaml
roles:
# Group systems
- instance-groups
allowDisabledDocker: false
apiVersion: v1
dnsBindAddress: 127.0.0.1:53
dnsRecursiveResolvConf: /etc/origin/node/resolv.conf
dnsDomain: cluster.local
dnsIP: 10.19.114.226
dockerConfig:
execHandlerName: ""
iptablesSyncPeriod: "30s"
imageConfig:
console#show logging
Logging is enabled
Console Logging: Level warnings. Messages : 1 logged, 5540 ignored
Monitor Logging: disabled
Buffer Logging: Level informational. Messages : 1079 logged, 4462 ignored
File Logging: Level emergencies. Messages : 0 logged, 5541 ignored
Switch Auditing : enabled
CLI Command Logging: disabled
Web Session Logging : disabled