Merge pull request #26 from sborenst/ocp_workshop_3.5_testing
Ocp workshop 3.5 testing
16 files deleted
10 files modified
| | |
| | | ---- |
| | | |
| | | ## For a HA environment |
| | | REGION=us-west-2 |
| | | REGION=ap-southeast-1 |
| | | KEYNAME=ansible_provisioner |
| | | GUID=shared |
| | | GUID=apac |
| | | ENVTYPE="ansible-provisioner" |
| | | CLOUDPROVIDER=ec2 |
| | | HOSTZONEID='Z3IHLWJZOU9SRT' |
| | |
| | | - vim-enhanced |
| | | - ansible |
| | | - python-boto |
| | | - lvm2 |
| | | - httpd |
| | | - yum-utils |
| | | - createrepo |
| | | |
| | | rhel_repos: |
| | | - rhel-7-server-rpms |
| | |
| | | |
| | | storage_vg: storagevg |
| | | storage_pvs: /dev/xvdb |
| | | storage_mount_path: /var/www/html |
| | | storage_mount_path: /srv |
| | |
| | | #From you workstation host, run the following command to download/sync the repos down to the REPOSYNC_HOST |
| | | # Your workstation needs to be able to authenticate to both the REPOSYNC_HOST and the TARGET_HOST |
| | | |
| | | # for |
| | | export REPOVERSION="$1" |
| | | export REPOMINORVERSION="$2" |
| | | # for version 3.4 of ocp |
| | | #export REPOMINORVERSION="3.4.1.12" |
| | | #export REPOVERSION="3.4" |
| | | |
| | | # # # for version 3.5 of ocp |
| | | # export REPOVERSION="3.5" |
| | | # export REPOMINORVERSION="3.5.5.5" |
| | | # |
| | | |
| | | |
| | | export REPOLIST="rhel-7-fast-datapath-rpms rhel-7-server-extras-rpms rhel-7-server-optional-rpms rhel-7-server-ose-${REPOVERSION}-rpms rhel-7-server-rpms rhel-7-server-rh-common-rpms" |
| | | #export REPOLIST="rhel-7-server-ose-${REPOVERSION}-rpms" |
| | | |
| | | export CLASS="ocp" |
| | | export REPODIR="/var/www/html/repos/" |
| | | export REPOPATH="${REPODIR}/${CLASS}/${REPOMINORVERSION}" |
| | | export REPOBASE="/srv/repos/" |
| | | export REPOPATH="${REPOBASE}/${CLASS}/${REPOMINORVERSION}" |
| | | echo "REPOLIST is: $REPOLIST" |
| | | echo "REPOVERSION is: ${REPOVERSION}" |
| | | echo "CLASS is: $CLASS" |
| | | # |
| | | # |
| | | # subscription-manager register --username=${RHNID} --password=${RHNPASS} |
| | | # subscription-manager list --available |
| | | # subscription-manager attach --pool=${RHNPOOL} |
| | | # subscription-manager repos --disable="*" |
| | | # subscription-manager repos \ |
| | | # --enable="rhel-7-server-rpms" \ |
| | | # --enable="rhel-7-server-extras-rpms" \ |
| | | # --enable="rhel-7-server-ose-${REPOVERSION}-rpms" \ |
| | | # --enable="rhel-7-server-optional-rpms" \ |
| | | # --enable="rhel-7-server-rh-common-rpms" \ |
| | | # --enable="rhel-7-fast-datapath-rpms" |
| | | # yum install -y yum-utils createrepo tmux |
| | | # yum clean all ; yum repolist |
| | | |
| | | # cd $REPOBASE |
| | | # rm -rf $REPOBASE |
| | | # mkdir -p $REPOBASE |
| | | # cd $REPOBASE |
| | | |
| | | mkdir -p ${REPOPATH} |
| | | |
| | | cd ${REPOPATH} |
| | | for repo_name in ${REPOLIST} ; |
| | | time for repo_name in ${REPOLIST} ; |
| | | do |
| | | echo "Processing repo: ${repo_name}" |
| | | echo "reposync -r ${repo_name} -n -m -p ." |
| | |
| | | cd ${repo_name} |
| | | sudo createrepo . |
| | | cd .. |
| | | #sudo tar -zcvf ${repo_name}.tar.gz ${repo_name} |
| | | echo "Completed processing of: ${repo_name}" |
| | | done |
| | | |
| | | ln -s ${REPOPATH} ${REPODIR}/${CLASS}/${REPOVERSION} |
| | | ln -s ${REPOBASE}/${CLASS}/${REPOMINORVERSION} ${REPOBASE}/${CLASS}/${REPOVERSION} |
| | | |
| | | |
| | | # |
| | | # |
| | | # subscription-manager register --username=${RHNID} --password=${RHNPASS} |
| | | # subscription-manager list --available |
| | | # subscription-manager attach --pool=${RHNPOOL} |
| | | # subscription-manager repos --disable="*" |
| | | # subscription-manager repos \ |
| | | # --enable="rhel-7-server-rpms" \ |
| | | # --enable="rhel-7-server-extras-rpms" \ |
| | | # --enable="rhel-7-server-ose-${REPOVERSION}-rpms" \ |
| | | # --enable="rhel-7-server-optional-rpms" \ |
| | | # --enable="rhel-7-server-rh-common-rpms" \ |
| | | # --enable="rhel-7-fast-datapath-rpms" |
| | | # yum install -y yum-utils createrepo tmux |
| | | # yum clean all ; yum repolist |
| | | |
| | | # cd $REPOBASE |
| | | # rm -rf $REPOBASE |
| | | # mkdir -p $REPOBASE |
| | | # cd $REPOBASE |
| | |
| | | } |
| | | }, |
| | | "VPCRouteInternetGateway": { |
| | | "Type": "AWS::EC2::Route", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "DependsOn" : "VpcGA", |
| | | "Type": "AWS::EC2::Route", |
| | | "Properties": { |
| | | "GatewayId": { |
| | | "Ref": "VpcInternetGateway" |
| | |
| | | "DeviceName": "/dev/xvdb", |
| | | "Ebs": { |
| | | "VolumeType": "gp2", |
| | | "VolumeSize": 20 |
| | | "VolumeSize": 300 |
| | | } |
| | | } |
| | | ] |
| | |
| | | |
| | | - file: "path=/opt/OPEN_Admin/ state=directory owner=opentlc-mgr recurse=yes group=opentlc-mgr mode=0770" |
| | | - file: "path=/opt/ansible_agnostic_deployer/ state=directory owner=opentlc-mgr recurse=yes group=opentlc-mgr mode=0770" |
| | | |
| | | - name: Copy ssh key to provisioner |
| | | copy: |
| | | src: ~/.ssh/{key_name}.pem |
| | | dest: /home/opentlc-mgr/.ssh/{key_name}.pem |
| | | - name: Allow Access to opentlc-mgr user |
| | | shell: | |
| | | mkdir /home/opentlc-mgr/bin; |
| | |
| | | mkdir /home/opentlc-mgr/.aws |
| | | echo ' |
| | | [default] |
| | | aws_access_key_id = "{{aws_access_key_id}}" |
| | | aws_secret_access_key = "{{aws_secret_access_key}}"' > /home/opentlc-mgr/.aws/credentials |
| | | aws_access_key_id = {{aws_access_key_id}} |
| | | aws_secret_access_key = {{aws_secret_access_key}}' > /home/opentlc-mgr/.aws/credentials |
| | | chown -R opentlc-mgr.opentlc-mgr /home/opentlc-mgr/.aws |
| | | |
| | | - name: Copy boto.cfg file to /etc |
| | | shell: "cp /opt/ansible_agnostic_deployer/ansible/inventory/boto.cfg /etc/boto.cfg" |
| | | - name: Copy boto.cfg file to /etc |
| | | - name: Copy Sync_Repositories.sh file to /root |
| | | shell: "cp /opt/ansible_agnostic_deployer/ansible/configs/ansible-provisioner/files/Sync_Repositories.sh /root" |
| | | - lvg: |
| | | vg: "{{ storage_vg }}" |
| | |
| | | - filesystem: |
| | | fstype: ext4 |
| | | dev: "/dev/{{ storage_vg }}/storagelv" |
| | | ignore_errors: true |
| | | |
| | | - file: |
| | | path: "{{ storage_mount_path }}" |
| | | state: directory |
| | | mode: 0755 |
| | | mode: 0777 |
| | | |
| | | - selinux: |
| | | policy: targeted |
| | | state: permissive |
| | | |
| | | - lineinfile: |
| | | dest: /etc/fstab |
| | | insertafter: EOF |
| | | line: "/dev/{{ storage_vg }}/nfsmount {{ storage_mount_path}} ext4 defaults 0 0" |
| | | line: "/dev/{{ storage_vg }}/storagelv {{ storage_mount_path}} ext4 defaults 0 0" |
| | | state: present |
| | | ignore_errors: true |
| | | - shell: "mount {{ storage_mount_path }} || echo already mounted" |
| | | |
| | | - shell: "systemctl enable httpd && systemctl restart httpd" |
| | | |
| | | - shell: "mkdir {{ storage_mount_path }} && mount {{ storage_mount_path }}" |
| | | # - shell: "SELINUX=enforcing" |
| | | - shell: "systemctl enable http && systemctl restart httpd" |
| | | - shell: "ln -s {{storage_mount_path}}/repos /var/www/html/repos" |
| | | # - shell: "chcon -R -t httpd_user_content_t /srv" |
| | | # - shell: "chcon -R -t httpd_user_content_t /var/www/html/repos" |
| | | ### Still need to add "env_secret_vars" files to actually get this to work |
| | | ### still need to run the repository sync script. |
| | |
| | | } |
| | | }, |
| | | "VPCRouteInternetGateway": { |
| | | "Type": "AWS::EC2::Route", |
| | | "DependsOn" : "VpcGA", |
| | | "Type": "AWS::EC2::Route", |
| | | "Properties": { |
| | | "GatewayId": { |
| | | "Ref": "VpcInternetGateway" |
| | |
| | | } |
| | | }, |
| | | "VPCRouteInternetGateway": { |
| | | "Type": "AWS::EC2::Route", |
| | | "DependsOn" : "VpcGA", |
| | | "Type": "AWS::EC2::Route", |
| | | "Properties": { |
| | | "GatewayId": { |
| | | "Ref": "VpcInternetGateway" |
| | |
| | | } |
| | | }, |
| | | "VPCRouteInternetGateway": { |
| | | "Type": "AWS::EC2::Route", |
| | | "DependsOn" : "VpcGA", |
| | | "Type": "AWS::EC2::Route", |
| | | "Properties": { |
| | | "GatewayId": { |
| | | "Ref": "VpcInternetGateway" |
| | |
| | | } |
| | | }, |
| | | "VPCRouteInternetGateway": { |
| | | "Type": "AWS::EC2::Route", |
| | | "DependsOn" : "VpcGA", |
| | | "Type": "AWS::EC2::Route", |
| | | "Properties": { |
| | | "GatewayId": { |
| | | "Ref": "VpcInternetGateway" |
| | |
| | | } |
| | | }, |
| | | "VPCRouteInternetGateway": { |
| | | "Type": "AWS::EC2::Route", |
| | | "DependsOn" : "VpcGA", |
| | | "Type": "AWS::EC2::Route", |
| | | "Properties": { |
| | | "GatewayId": { |
| | | "Ref": "VpcInternetGateway" |