From ed5a7bca3128debb7e4d53bceb86520357d15e6b Mon Sep 17 00:00:00 2001 From: "Simental Magana, Marcos" Date: Fri, 15 Jul 2016 12:35:57 -0500 Subject: [PATCH] ciao-deploy.rst: update documentation with new ciao ansible variables Signed-off-by: Simental Magana, Marcos --- source/ciao-deploy.rst | 98 ++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 52 deletions(-) diff --git a/source/ciao-deploy.rst b/source/ciao-deploy.rst index 369f70cd..2eb9786a 100644 --- a/source/ciao-deploy.rst +++ b/source/ciao-deploy.rst @@ -14,9 +14,9 @@ For more information visit https://clearlinux.org/ciao. Environment =========== -For this example, we'll use a total of three nodes: +For this example, we'll use a total of four nodes: - A `controller `_ node which will be used to communicate with Keystone. - - A `compute node `_ which will spawn the VM's and containers. + - Two `compute nodes `_ which will spawn the VM's and containers. - A `network node `_ which will handle the netowrking for the workloads. @@ -88,63 +88,57 @@ they will serve. For this example it should look like this:: ciao-network.example.com [ciao_compute] - ciao-compute.example.com + ciao-compute1.example.com + ciao-compute2.example.com This ``groups_var/all`` file contains variables that will applied for your ciao setup. The mandatory variables are already there; be sure to change the values accordingly to fit your environment. It should look something like this:: --- + # Vars required for mariadb and os-common + # https://github.com/clearlinux/clear-config-management/tree/master/roles/mariadb + # https://github.com/clearlinux/clear-config-management/tree/master/roles/os-common database_root_password: secret - glance_fqdn: ciao-controller.example.com - glance_user_password: secret - glance_database_password: secret - - ciao_controller_ip: 172.17.0.6 - ciao_mgmt_subnet: 172.17.0.0/24 - ciao_compute_subnet: "{{ciao_mgmt_subnet}}" - ciao_csr_password: secret - ciao_ssh_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDhn1BIdDv2Rpx6qhYt9Z+3eOg1JIGyt6E0as3J02ymXsN2Zc4s+XXcj0tkifgZmKmm1H4dt1bVMcWcODl8qP6hjRVjSdo7KW8vXYkQv7eXNnhO+4vCttI6UsaB8LDdv6/TRGaRjj66shAC70ySH77/COAHnzTJdSWvzEVBs4hO8rii6MmyDduQhZM14JpCFP2zkZ1ICNcPjf60a4vi2GiW8PWlJwrUuzsa5qfWCExA98UD04lg+mwFCYBfgQeQcXKN+eQqV6XQ8ujE/++pLSjsSSK1/cXCkWtMGJGTgjY5zH20tfIbJPnBeOIlYvWjJDNFvCC5b9UspTLlhnggGhZ root@ciao-controller.example.com - ciao_admin_email: admin@ciao-controller.example.com - ciao_cert_organization: Example, Inc. - + # Vars required for os-common + # https://github.com/clearlinux/clear-config-management/tree/master/roles/os-common keystone_fqdn: ciao-controller.example.com - keystone_root_domain: ciao-controller.example.com - keystone_p12password: secret - keystone_database_password: secret keystone_admin_password: secret - keystone_services: - - service_name: "ciao" - service_type: "compute" - keystone_projects: - - project_name: "demo" - keystone_users: - - user_name: "csr" - password: "{{ciao_csr_password}}" - project_name: "admin" - - user_name: "demo" - password: "secret" - project_name: "demo" - keystone_roles: - - demo - keystone_user_roles: - - user_name: csr - project_name: service - role_name: admin - - user_name: demo - project_name: demo - role_name: demo + + # Vars required for os-keystone + # https://github.com/clearlinux/clear-config-management/tree/master/roles/os-keystone + keystone_database_password: secret + keystone_root_domain: example.com + keystone_p12password: secret + + # Vars required for ciao-common + # https://github.com/clearlinux/clear-config-management/tree/master/roles/ciao-common + ciao_controller_fqdn: ciao-controller.example.com + + # Vars required for ciao-controller + # https://github.com/clearlinux/clear-config-management/tree/master/roles/ciao-controller + ciao_service_user: csr + ciao_service_password: secret + ciao_admin_email: admin@example.com + ciao_cert_organization: Example, Inc. + ciao_guest_user: demouser + ciao_guest_key: ~/.ssh/guest_vms.pub + -A full list of available variables can be found under -``/usr/share/ansible/roles//defaults/main.yml`` +The `ciao_guest_key` is the key to be used to connect to the VMs created by ciao, +you can use the `ssh-keygen` command to create one as explained in the prerequisites +section. + +A full list of available variables can be found in the ciao-* roles at +https://github.com/clearlinux/clear-config-management/tree/master/roles Run the playbook ================ Once you have your variables and hosts file configured, the deployment can be fired with the following command:: - # ansible-playbook -i hosts ciao.yml + # ansible-playbook -i hosts ciao.yml --private-key= Verify ====== @@ -154,27 +148,27 @@ Change the username, password, controller and identity values to match your setup as specified in the ``groups_var/all`` file:: # ciao-cli -identity=https://ciao-controller.example.com:35357 -username admin -password secret -controller=ciao-controller.example.com node status - Total Nodes 2 - Ready 2 - Full 0 + Total Nodes 3 + Ready 0 + Full 3 Offline 0 Maintenance 0 -You could also create a ciaorc file that contains the following environment -variables:: +You could also take a look at the ciaorc file created (in `~/ciaorc`) +that contains the following environment variables:: # cat ciaorc export CIAO_CONTROLLER=ciao-controller.example.com export CIAO_IDENTITY=https://ciao-controller.example.com:35357 - export CIAO_USERNAME=admin - export CIAO_PASSWORD=secure + export CIAO_USERNAME=csr + export CIAO_PASSWORD=secret then you could verify with the following command:: # source ciaorc # ciao-cli node status - Total Nodes 2 - Ready 2 - Full 0 + Total Nodes 3 + Ready 0 + Full 3 Offline 0 Maintenance 0