Commit Graph

11 Commits

Author SHA1 Message Date
Ricardo Carrillo Cruz 126a547f04 Add quotas support for the cloud launcher
While we get a proper os_quota module in Ansible, let's just workaround
it with good old openstack client.

Change-Id: I4036359b09f5bb534143dcb18abe57586b6c8740
2016-10-14 21:01:39 +00:00
Ricardo Carrillo Cruz 702c099e05 Add user roles support for cloud launcher
Change-Id: I3d12403a79b0551ff993816b24829f9bf7424ad4
2016-09-29 23:40:34 +02:00
Ricardo Carrillo Cruz 9a4ad9406f Add support for keystone roles
Change-Id: I2df8503bb713827f0f04691c2f259dc9541c9c83
2016-09-28 16:29:08 +02:00
Ricardo Carrillo Cruz 901ff94f59 Run cloud launcher with latest release candidate
Along with the requirements change, there are also needed changes
roles_path and ansible_python_interpreter variable handling, for
some reason latest Ansible did not like current configuration.

Change-Id: I5fc78d479e276711365ea497edd4d3e38cacd650
2016-09-17 19:32:44 +00:00
Ricardo Carrillo Cruz fe8af280a4 Add ability to download an image from the Internet to upload it to Glance
Unfortunately, it seems Glance v2 does not have the capability to upload
an image by referencing a URL, it has to be a local file.
Adding logic to the role and flags should the user want to pull an image
to the Ansible control machine prior to the usual upload.

Change-Id: I2e2886287a045dab89fe712e39b42c2383d6aec6
2016-09-01 23:35:40 +02:00
Ricardo Carrillo Cruz 205f4d31de Add support for clustered servers
Certain services are expected to be served by more than one server,
think of git mirrors, zuul workers etc.
While we could define all of them with numbered pattern manually
in the resources.yaml file, this gets unwieldy and boring
if the count is large, repeating on and on the same
server stanzas with just <service_name><$NODE_COUNT>.
This change allows to put a 'node_count' attribute to the server
resource. With it, the role will create as many servers as
'node_count' by numbering the servers as <server_name><$NODE_COUNT>.
e.g.

servers:
  - name: logstash-worker.openstack.org
    image: ubuntu-trusty
    flavor: d1
    node_count: 2

That would make the role to create two server instances named
'logstash-worker01.openstack.org' and 'logstash-worker02.openstack.org'

Change-Id: I220a2786efe56187f60f1eed2f32e661e6d3ed3f
2016-07-20 14:49:03 +02:00
Ricardo Carrillo Cruz 301ae3faee Refactor the per-cloud and per-profile code
Rather than copy-pasting around same tasks but changing slightly
the way we loop them when it's a per-profile or a per-cloud resource,
refactor the code a bit so both mechanisms call the same task.
e.g. the per-profile projects and per-cloud projects will call in the
end create_project, the only thing it varies is the loop prior to getting
the individual project items.

Change-Id: Ida2aebadafd4d60d11fa18aa2208dad235badd4c
2016-07-19 00:12:44 +02:00
Ricardo Carrillo Cruz 59c05c8048 Add post test hook function
Change-Id: Icfe3d5a4f4226d36885664bb95a370ada13c630f
2016-07-18 10:09:49 +02:00
Ricardo Carrillo Cruz adc37970ab Add ability to generate keypair on-the-fly
This change adds a flag 'generate_keypair' that makes the
role to generate an ssh keypair, create an OpenStack keypair with
it and all the servers of the play will have that key baked in.
The folder, key type and key length are also configurable.

Change-Id: Iccbec24e9834c1fa03da8add94e069f622024537
2016-06-22 13:14:03 +00:00
Ricardo Carrillo Cruz 0622bb8088 Make tests to use libraries from tox venv
Change-Id: I64b5e4f675c2b807d3712c9fe72d0c809fb1d948
2016-06-02 06:40:53 +00:00
Ricardo Carrillo Cruz 125f8812dc Add tox.ini and tests playbooks
Change-Id: If8896976ad9330cd71044fcfbf8ce893639e1324
2016-05-27 09:52:31 +00:00