Commit Graph
44 Commits
Author SHA1 Message Date
Alberto Murillo Silva fab229c464 ciao-controller: Fix cnci image creation logic
Delete any of cnci_image.img.xz, cnci_image.img or .cnci_ready files
to let ansible rebuild the cnci image.

If the tree files mentioned above already exists. Skip the
image creation phase.

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2016-10-20 14:52:37 -05:00
Alberto Murillo Silva 420f3de775 ciao-controller: Fix become statements
Roles are invoked with become: yes in the playbook.

This change let all tasks run as root and adds
become: no only to the tasks that need to be run
as the local user.

Fixes #97

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2016-10-20 14:09:27 -05:00
Alberto Murillo Silva 7614e865c5 ciao-controller: Refactor images.yml
Group multiple get_url tasks into one with_items

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2016-10-20 14:07:54 -05:00
Alberto Murillo Silva 94723efd6e ciao-controller: Refactor certificates.yml
Group ubuntu tasks and fedora tasks inside a block

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2016-10-20 14:05:59 -05:00
Alberto Murillo Silva b1a0be33c4 ciao-controller: Update task syntax
- Define tasks attributes in the following order:

- name:
  become:
  connection:
  module:

Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com>
2016-10-20 14:03:18 -05:00
Alberto Murillo 6ad6d3615f ciao: Install ciao-cert on all nodes (#90)
ciao-cert now has a -dump parameter which gives information about
the certificates.

This change installs ciao-cert on all nodes with SSNTP certificates
as it is usefull to debug certificate issues.

Fixes #87

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-10-14 17:05:48 -05:00
Alberto Murillo a53d5c56bc ciao-controller: Do not create /etc/ssl/certs
ClearLinux 10910 creates /etc/ssl/certs as a symlink
to /var/cache/ca-certs and Ubuntu already ships the
directory.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-10-11 12:58:22 -05:00
Alberto Murillo f9d3123ce1 ciao-controller: Run losetup as root
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-10-11 11:31:14 -05:00
Marcos Simental 55820f8541 ciao-controller: fix syntax typo while creating cnci image (#80)
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
2016-10-07 15:47:51 -05:00
Marcos Simental c9dba10716 ciao-controller: remove nbd usage, using loops instead. (#76)
the `qemu-nbd` tool it's used to manipulate the cnci image, which
is already a raw image (not qcow as thought), so we can use
raw image manipulation, removing all the need of nbd manipulation
tools.

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
2016-10-07 10:17:53 -05:00
Marcos Simental a6cd7f5315 ciao-controller: explicitly specify local tasks for build. (#70)
Before this commit, all build tasks for the ciao-controller
role were perfomed as `connection: local`, this is handy
but not accurate (e.g: "Fetch ciao files" shouldn't be local).

This commit specifies which tasks in build should be
performed as local, instead of the whole build.yml playbook.

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
2016-10-05 14:47:10 -05:00
Alberto Murillo fe5aba7d4f ciao-controller: remove secret_path option from configuration
This option is no longer configurable since there is no secure
way to pass this value to qemu cli other than looking for the
default path for the keyring file.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-10-03 13:36:34 -05:00
Alberto Murillo e92592adce ciao: create admin-openrc and demo-openrc (#60)
The playbooks were creating a ciaorc to authenticate the cli
with the ciao user.

The ciao user is reserved for ciao services authenticating into keystone
and should not be used in the cli to create instances.

This changes creates admin-openrc with credentials for the admin user
and demo-openrc with credentials for the demo user to be used by ciao-cli.

Fixes #46

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-27 11:19:51 -05:00
Alberto Murillo 89dd487af9 ciao-common: Add gopath variable
- Allow the user to customize the location of GOPATH
- Remove -u option from go get command to pickup changes
  made by developers that are not ready in the repository.

Fixes #40

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-19 14:37:25 -05:00
Alberto Murillo 601dfe89a8 documentation: Add contribution notice
Add a contribution notice on each role to direct users to
open issues and pull requests at github.com/clearlinux/clear-config-management
rather than github.com/clearlinux/ansible-role-<rolename>

Fixes #43

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-19 11:54:01 -05:00
Alberto Murillo 93cf10a1bb ciao-controller: Do not validate certs when downloading images
SOmetimes when behind a proxy, cnci and fedora images cannot be
downloaded because of certificate cannot be validated.

Fixes #45

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-09 14:04:38 -05:00
Alberto Murillo c65d594bad Restart services when binaries gets updated.
When ciao_dev is set to true and there was an update in the code, ciao
sources is updated and binaries are recompiled and transfered to the nodes
but the service were not being restarted.

Fixes #42

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-09 11:13:27 -05:00
Alberto Murillo ae2051a282 ciao-controller: Add ceph configuration
add ceph_id and secret_path variables to specify the
cephx user id and its keyring file in the configuration file.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-09 10:53:28 -05:00
Alberto Murillo 4b0633187c ciao-controller: Create storage service and endpoint in keystone
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-07 15:48:30 -05:00
Alberto Murillo f870a3ef20 Update ciao deployment
- Deployment of ciao has changed from installing everyghin in packages
to install keystone and ciao-webui from containers.

- ciao-laucher will detect the operating system and install the required
dependencies

- Support for Ubuntu 16.04 and Fedora 24 has been added.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-09-02 11:17:47 -05:00
Alberto Murillo 0545463144 ciao-controller: update mgmt_net and compute_net vars
mgmt_net and compute_net use to be a scalar value.

They are now a list of networks

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-16 11:43:36 -05:00
Alberto Murillo c0a6def082 ciao: Refactor code
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-11 14:51:21 -05:00
Alberto Murillo 20a861ea14 ciao-controller: Add a note on ciao_guest_{user,key} (#31)
These variables will setup access to ALL vm launched including
CNCI images.

This is a temporary solution for development/testing purposes
until a formal way to define per VM access from the user
perspective is available

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-04 16:43:17 -05:00
Alberto Murillo ac18e464df ciao-controller: Create the cnci image once.
This commit creates /var/lib/ciao/images/.cnci_ready file after
it has finished with the configuration of a cnci image.

If the file exists then the cnci image setup will be skipped.

This change prevents the playbook from creating and transfering the cnci
image each time is run and only does it when its necessary.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-04 16:42:20 -05:00
Alberto Murillo 5ab9fa9606 ciao-controller: Fix CA Certificate handling
Tasks to retrieve and enable the controllers ca root certificate
where being marked as changed every time the playbooks runs

This commit properly handles the copy and enabling of the ca
certificate in both clearlinux and ubuntu.
2016-08-04 15:42:07 -05:00
Alberto Murillo f013bcf820 ciao-controller: Build CIAO from sources is always 'changed'
Task Build CIAO from sources is always tagged as 'changed'
even when nothing has changed

This commit tags the task as unchanged when there is no change

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-04 13:04:15 -05:00
Alberto Murillo 3a91ad13b1 ciao-controller: Add support for Ubuntu 16.04 (Xenial)
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-08-02 17:50:10 -05:00
Alberto Murillo 1e7bc15b39 ciao-controller: Install os-core-dev
When building CIAO from sources, gcc is required to compile
the following dependencies.

github.com/01org/ciao/vendor/github.com/vishvananda/netlink
github.com/01org/ciao/vendor/github.com/docker/docker/pkg/term
github.com/01org/ciao/vendor/github.com/mattn/go-sqlite3

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-26 14:00:26 -05:00
Alberto Murillo 48b2fa8326 Mark unchaged task as OK (#29)
There are some tasks that are marked as CHANGED even if they
did not change anything.

- os-keystone: Perform a Keystone DB sync
- os-keystone: bootstrap keystone
- os-glance: Perform a Glance DB sync
- os-glance: Retrieve CA certificate
- os-cinder: Retrieve CA certificate
- os-swift:  Retrieve CA certificate
- ciao-controller: Get hash from cacert.pem

Fixes #22

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-20 10:54:09 -05:00
Alberto Murillo c1d699995e ciao: Install ciao from github sources (#25)
* ciao: Install ciao from github sources

- Add a new variable ciao_dev to ciao-common
  When set to True, it will build ciao from the master branch
  and put the binaries in /usr/local/bin

  When set to False (default) it will install ciao from the OS
  packages

Fixes #21

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>

* ciao: Add ciao_cleanup.yml playbook (#28)

- This playbook cleanups a ciao cluster

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-15 14:43:07 -05:00
Alberto Murillo c94440c70a ciao-controller: Create compute service and endpoint for OpenStack
Rally needs a compute endpoint in order to run.

- Create ciao admin user in openstack by default
- Create ciao compute service in openstack by default
- Create ciao compute endpoint in openstack by default
- Remove optional variables in example playbook to create
  the items above.

Fixes #14

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-11 16:10:20 -05:00
Alberto Murillo d8f75164e2 examples: Update ciao examples
- Update ciao example playbook with newer variables
- Remove glance from the example since it is not yet
  supported by ciao.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-11 15:23:37 -05:00
Alberto Murillo 553b1f04f5 Update documentation
- Change format for README.md files from rst to githubs markdown
- Document role variables in a table inside README.md files
- Document each variable in defaults/main.yml files

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-11 15:23:33 -05:00
Alberto Murillo bb10d701b5 os-* ciao-*: Use service_fqdn for reference of a node.
There are some places (like certificates) where the
controller hostname should be used.

This was achieved with groups['ciao_controller'][0] which worked
when the host file was defined as:

[ciao_controller]
controller.example.com

But if the IP is defined in the host file instead of the fqdn,
the ip was getting used instead of its fqdn.

- Replace {{ groups['ciao_controller'][0] }}
  with {{ ciao_controller_fqdn }}

- Replace {{ groups['openstack_identity'][0] }}
  with {{ keystone_fqdn }}

- Replace {{ groups['openstack_object_storage_controller'][0] }}
  with {{ swift_fqdn }}

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-08 11:07:38 -05:00
Alberto Murillo 3a6e6acecc Add white spaces for better readability
- Ansible best practices recomends a generous use of whitespaces
  to improve readability.
- Variables are normally written as {{ varname }}
- Add spaces around jinja filters

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-08 11:07:29 -05:00
Alberto Murillo 43d8848ad6 Correct task names on install files
- Task names on install.yml files where updated:
   from: "Install <package-name> bundle"
   to:   "Install <bundle-name> bundle"

- Task names on install.yml files where updated:
   from: "Run swupd verify"
   to:   "Verify <bundle-name> has been installed"

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-07-07 17:30:00 -05:00
Alberto Murillo 6e963a56e2 ciao: Install the latest ciao-cnci-agent into cnci image
The latest ciao cnci image (at the time of this commit) is based
on clearlinux 8260 which contains an old version of cnci agent.

This commit fetchs the latest ciao-cnci-agent binary and its
assosiated service file and injects them into the cnci image

- Update clearlinux image url to 8740
- Update ciao cnci image url to 8260
- Inject ciao-cnci-agent into cnci image
- Inject ciao-cnci-agent.service into cnci image

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-06-14 18:34:00 -05:00
Alberto Murillo 490fde6e43 ciao: Make use of ciao configuration
Ciao configuration implements an API for ciao components
to fetch and store cluster configuration data from a
specific storage backend.

ciao-scheduler reads the configuration from the backend
and propagates it to other components through SSNTP

More detailed information can be found at:
https://github.com/01org/ciao/tree/master/configuration

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-06-14 16:41:02 -05:00
Munoz, Obed N 1454de7742 [ciao-controller] Add datastore paths in ciao-controller command
Signed-off-by: Munoz, Obed N <obed.n.munoz@intel.com>
2016-05-30 14:47:41 -05:00
Alberto Murillo 818ce5b7c5 ciao-controller: rename cloud-init user
- let cloud-init create a user named 'demouser' which
describes better the intent of the user and because
'ciao' is already taken by a system user

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-05-19 11:12:18 -05:00
Alberto Murillo e07475a54b ciao-controller: Retrieve cacert from keystone node
- Keystone might be installed in a different machine
than the controller node.

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-05-17 15:58:12 -05:00
Alberto Murillo baec03ac04 ciao: add handlers to restart services
- ciao-common: add handler to reload systemd config files
- ciao-controller: add handler to restart controller service
- ciao-controller: add handler to restart scheduler service
- ciao-compute: add handler to restart compute service
- ciao-network: add handler to restart network service

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-05-17 15:58:12 -05:00
Alberto Murillo 9f47db5854 os-keystone: move certificates to /etc/keystone
- Move api certificates from /etc/nginx/ssl to a per-application directory
like /etc/keystone/ssl

Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-05-16 18:00:35 -05:00
Alberto Murillo e58de40323 CIAO: Add playbooks
Signed-off-by: Alberto Murillo <alberto.murillo.silva@intel.com>
2016-05-12 14:16:10 -05:00