Preparing_your_workstation.adoc | ●●●●● patch | view | raw | blame | history | |
README.adoc | ●●●●● patch | view | raw | blame | history | |
ansible/configs/bu-workshop/env_vars.yml | ●●●●● patch | view | raw | blame | history | |
ansible/configs/bu-workshop/post_software.yml | ●●●●● patch | view | raw | blame | history | |
example_secret_vars.yml | ●●●●● patch | view | raw | blame | history |
Preparing_your_workstation.adoc
@@ -104,13 +104,10 @@ ---- # Install basic packages yum install -y wget python python-boto unzip tmux git yum install -y wget python python-pip unzip tmux git # Another option to configure python boto is: git clone git://github.com/boto/boto.git cd boto python setup.py install # Install boto libraries for AWS access pip install boto botocore boto3 # Enable epel repositories for Ansible cd /tmp README.adoc
@@ -26,6 +26,30 @@ - [awscli bundle](https://s3.amazonaws.com/aws-cli/awscli-bundle.zip) tested with version 1.11.32 == Change variables There are some variables that you need to set: .file: `ansible/configs/bu-workshop/env_vars.yml`: - `hosted_zone_id` - `repo_method: "rhn"` in case you don't provide direct repo files - `env_authorized_key` - `subdomain_base_suffix` - `key_name` - `admin_user_password` OpenShift admin password .file: `ansible/inventory/ec2.ini`: - `regions=` for dynamic inventory to find your desired region .file: `Ansible/configs/bu-workshop/env_secret_vars.yml`: - self explanatory, take a look and set them all. There are some tunables to size your cluster: .file: `ansible/configs/bu-workshop/env_vars.yml`: - `num_nodes` - `user_vols` - `user_vols_size` == Standard Configurations @@ -38,8 +62,9 @@ well. NOTE: Until we implement using Ansible Vault, each "Config" has two vars files `_vars` and `_secret_vars`. The `example_secret_vars` file shows the format for what to put in your `CONFIGNAME_secret_vars` file. `env_vars.yml` and `env_secret_vars.yml`. link:./example_secret_vars.yml[example_secret_vars.yml] file shows the format for what to put in your `CONFIGNAME/env_secret_vars.yml` file. == Running the Ansible Playbooks @@ -48,8 +73,14 @@ files, simply run Ansible like so: ---- ansible-playbook -i 127.0.0.1 ansible/main.yml -e "env_type=config-name" -e "aws_region=ap-southeast-2" -e "guid=youruniqueidentifier" ansible-playbook -i $PWD/ansible/inventory/ec2.py ansible/main.yml \ -e "env_type=config-name" \ -e "aws_region=ap-southeast-2" \ -e "guid=youruniqueidentifier" \ -e "cloud_provider=ec2" \ -e "software_to_deploy=openshift" \ -e num_nodes=4 \ -e ANSIBLE_REPO_PATH=$PWD/ansible ---- NOTE: Be sure to exchange `guid` for a sensible prefix of your choosing. ansible/configs/bu-workshop/env_vars.yml
@@ -3,6 +3,8 @@ remote_user: "ec2-user" use_internal_dns_zone: false deploy_openshift: true # Desired openshift admin password admin_user_password: "openshift" install_nfs: true update_packages: false install_bastion: true @@ -12,8 +14,8 @@ hosted_zone_id: "Z226QCZPDICGRI" repo_method: "file" use_own_key: true env_authorized_key: "roadshow" set_env_authorized_key: false env_authorized_key: "roadshow" # this is for additional key into cluster set_env_authorized_key: false # controls whether to insert it or not. tower_run: false workshopper_tag: "0.1" install_ipa_client: false @@ -143,7 +145,8 @@ infranode_instance_type: "m4.4xlarge" node_instance_type: "m4.xlarge" num_nodes: 24 # make sure you save private key with suffix .ssh/<key>.pem # without .pem it won't get found. Also ensure key is in ssh-agent or # set as default key: ln -s <key>.pem ~/.ssh/id_rsa key_name: "roadshow" cf_template_description: "{{ env_type }}-{{ guid }} template" ansible/configs/bu-workshop/post_software.yml
@@ -125,11 +125,17 @@ - workshop - workshop_admins tasks: - name: check admin password is set fail: msg="Bailing out. You need to set 'admin_user_password'" when: admin_user_password is undefined - name: check admin password is not empty string fail: msg="Bailing out. 'admin_user_password' can not be empty string" when: admin_user_password == "" - name: Add administrative user to htpasswd file htpasswd: dest: "/etc/origin/master/htpasswd" name: "admin" password: "openshift3" password: "{{ admin_user_password }}" state: present - name: Give administrative user cluster-admin privileges example_secret_vars.yml
New file @@ -0,0 +1,9 @@ ## Logon credentials for Red Hat Network # ## Required if using the subscription component # ## of this playbook. rhel_subscription_user: '' rhel_subscription_pass: '' # # ## AWS Credentials. This is required. aws_access_key_id: "" aws_secret_access_key: ""