Update repo README, add compatibility check, sample config files
In this commit: - Add execution environment, required additional packages, supported software releases, and links to Ansible installation as well as StarlingX deployment guides to repo README.rst - Add check for supported host software versions to bootstrap playbook - Add example files for a sample setup of 2 hosts, a site.yml and a secret file which the users can copy to the location of their choice and customize to suit their remote bootstrap requirements. Story: 2004695 Task: 34753 Change-Id: I400021a5a460e1686ef717632c70123b2a93064a Signed-off-by: Tee Ngo <tee.ngo@windriver.com>
This commit is contained in:
parent
26444e7554
commit
c7390f6300
37
README.rst
37
README.rst
@ -3,3 +3,40 @@ stx-ansible-playbooks
|
||||
=====================
|
||||
|
||||
StarlingX Bootstrap and Deployment Playbooks
|
||||
|
||||
Execution environment
|
||||
=====================
|
||||
|
||||
- Linux like OS (recent Linux based distributions, MacOS, Cygwin)
|
||||
- Python 2.7
|
||||
|
||||
Additional Required Packages
|
||||
============================
|
||||
The playbooks in this repo have been verified with the following versions of Ansible
|
||||
and StarlingX playbooks dependencies:
|
||||
|
||||
- sshpass 1.06
|
||||
- python2-ptyprocess 0.5
|
||||
- python2-pexpect 4.6
|
||||
- ``ansible`` 2.7.5
|
||||
|
||||
Supported StarlingX Releases
|
||||
============================
|
||||
The playbooks in this repo are compatible with the following StarlingX releases:
|
||||
|
||||
- 19.01
|
||||
|
||||
Executing StarlingX Playbooks
|
||||
=============================
|
||||
|
||||
Executing Bootstrap Playbook
|
||||
----------------------------
|
||||
Please refer to ``StarlingX Deployment Guides``, section **Configuration controller-0**
|
||||
of the respective system configuration for instructions on how to set up and execute
|
||||
the bootstrap playbook from another host.
|
||||
|
||||
References
|
||||
==========
|
||||
.. [1] https://docs.ansible.com/ansible/2.7/installation_guide/index.html
|
||||
.. [2] https://docs.starlingx.io/deployment_guides/index.html
|
||||
|
||||
|
3
examples/remote/hostname1.yml
Normal file
3
examples/remote/hostname1.yml
Normal file
@ -0,0 +1,3 @@
|
||||
timezone: Japan
|
||||
cluster_host_subnet: 192.168.207.0/24
|
||||
external_oam_floating_address: 172.16.0.17
|
3
examples/remote/hostname2.yml
Normal file
3
examples/remote/hostname2.yml
Normal file
@ -0,0 +1,3 @@
|
||||
system_mode: duplex
|
||||
management_subnet: 192.168.204.0/24
|
||||
external_oam_floating_address: 172.16.0.144
|
15
examples/remote/hosts
Normal file
15
examples/remote/hosts
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
all:
|
||||
hosts:
|
||||
hostname1:
|
||||
# Ansible host IP is the IP of the controller host that is externally
|
||||
# accessible for controller bootstrap and system deployment purposes.
|
||||
# This IP can be created via DHCP or statically.
|
||||
ansible_host: 172.16.0.17
|
||||
hostname2:
|
||||
ansible_host: 172.16.0.144
|
||||
|
||||
vars:
|
||||
ansible_ssh_user: sysadmin
|
||||
ansible_ssh_pass: St8rlingX*
|
||||
ansible_become_pass: St8rlingX*
|
24
examples/remote/sample_secrets.yml
Normal file
24
examples/remote/sample_secrets.yml
Normal file
@ -0,0 +1,24 @@
|
||||
# The following are configuration parameters that should be stored
|
||||
# in secrets files using Ansible vault.
|
||||
#
|
||||
# Bootstrap specific parameters stored in the vault must have vault_
|
||||
# prefix. The same rule is not applied to Ansible specific parameters.
|
||||
#
|
||||
|
||||
# The following settings could be host specific, in which case they
|
||||
# can be placed in the <inventory_hostname>_secrets.yml where
|
||||
# applicable.
|
||||
vault_admin_username: stx-admin
|
||||
vault_admin_password: Boot5trap*
|
||||
|
||||
# The following settings are usually common to all hosts, in which
|
||||
# case they can be placed in the secrets.yml file.
|
||||
vault_password_change_responses:
|
||||
yes/no: 'yes'
|
||||
sysadmin*: 'sysadmin'
|
||||
\(current\) UNIX password: 'sysadmin'
|
||||
(?i)New password: 'Boot5trap*'
|
||||
(?i)Retype new password: 'Boot5trap*'
|
||||
|
||||
ansible_become_pass: Boot5trap*
|
||||
ansible_ssh_pass: Boot5trap*
|
7
examples/remote/site.yml
Normal file
7
examples/remote/site.yml
Normal file
@ -0,0 +1,7 @@
|
||||
# Configuration parameters in this file will apply to all
|
||||
# hosts in the hosts file unless they are overwritten in the
|
||||
# inventory_hostname.yml file or at the command line.
|
||||
external_oam_subnet: 172.16.0.0/12
|
||||
external_oam_gateway_address: 172.16.0.1
|
||||
dns_servers:
|
||||
- 1.1.1.1
|
@ -17,7 +17,8 @@
|
||||
path: "{{ item }}"
|
||||
register: files_to_import
|
||||
with_items:
|
||||
- "{{ override_files_dir }}/secret"
|
||||
- "{{ override_files_dir }}/secrets.yml"
|
||||
- "{{ override_files_dir }}/{{ inventory_hostname }}_secrets.yml"
|
||||
- "{{ override_files_dir }}/site.yml"
|
||||
- "{{ override_files_dir }}/{{ inventory_hostname }}.yml"
|
||||
delegate_to: localhost
|
||||
|
@ -232,6 +232,11 @@
|
||||
software_version: "{{ sw_version_result.stdout_lines[0] }}"
|
||||
system_type: "{{ system_type_result.stdout_lines[0] }}"
|
||||
|
||||
- name: Fail if host software version is not supported by this playbook
|
||||
fail:
|
||||
msg: "This playbook is not compatible with StarlingX software version {{ software_version }}."
|
||||
when: software_version not in supported_release_versions
|
||||
|
||||
- name: Set config path facts
|
||||
set_fact:
|
||||
keyring_permdir: "{{ platform_path + '/.keyring/' + software_version }}"
|
||||
|
@ -3,3 +3,5 @@ image_brand: StarlingX
|
||||
platform_path: /opt/platform
|
||||
puppet_path: /opt/platform/puppet
|
||||
standard_root_disk_size: 500
|
||||
supported_release_versions:
|
||||
- "19.01"
|
||||
|
Loading…
Reference in New Issue
Block a user