Commit Graph

156 Commits

Author SHA1 Message Date
OpenDev Sysadmins 028539a0f2 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:49:49 +00:00
Ian Wienand 0b6d56c9d9 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I52d96411fb6a9c2cd167e35dd3bdcff816db3a2e
2019-03-24 20:33:50 +00:00
Andreas Jaeger 9b02a6ebe2 Import infra-ansible job
Import the infra-ansible job, convert it to Zuul v3 native and rename
for our naming conventions.

Change-Id: I5669fd546e4c1ae33133ce7a45e7615a67983532
2018-02-03 16:41:26 +01:00
Ricardo Carrillo Cruz e750ccb869 Set hostnames before the common play
Servers should be able to resolv Internet and the infra hosts
before doing anything useful on them

Change-Id: If694f45235e8c49a6caaee45dbf6d21d79385f65
2016-06-24 12:58:36 +00:00
Ricardo Carrillo Cruz f859b1e47f Make services optional
Some users will use infra-ansible for 3rd party, some others
will want a minimal infra with Gerrit.
Moreover, some services are going away with the advent of
Zuul v3.
As such, make the services definitions optional, so users can
really define what they want for the deploy.
Also, reworked the services to be a list, to be more easily
loopable with Ansible with_subelements.

Change-Id: I0097bf4d90350fbe53b94e27b2036d4b8083263a
2016-06-17 10:48:36 +00:00
Jenkins 6c19c5162f Merge "Provide more realistic resources.yml.sample" 2016-06-09 13:25:45 +00:00
Jenkins 262ee6a7cb Merge "Set resolv.conf on nodes before bootstrap" 2016-06-09 13:25:40 +00:00
Ricardo Carrillo Cruz 8d92825775 Provide more realistic resources.yml.sample
The previous resources.yml.sample was a copy-paste from
the cloud-launcher resources.yml.sample file.
This looks like more as a test deployment for a minimal
infra, also matching names on infra_config.yml services dict.

Change-Id: I10cc518686940009946c201b1b19b9e612cb39b2
2016-06-09 12:35:17 +00:00
Jenkins 2c1f59b581 Merge "Reuse the puppet-openstackci zuul scheduler class" 2016-06-09 12:25:50 +00:00
Ricardo Carrillo Cruz afaf0e4a2c Set resolv.conf on nodes before bootstrap
In some clouds, the nodes created may not have a usable
dns server from Neutron.
Use the Google one, may set this role parameterized at
some point.

Change-Id: I05fcd867e47fcc45dab25d5be5c8349d272514f4
2016-06-09 12:15:40 +00:00
Jenkins 65ce185c2b Merge "Wait for server to be ssh reachable before bootstrap/configuration" 2016-06-09 07:22:57 +00:00
Ricardo Carrillo Cruz 929490ff8c Wait for server to be ssh reachable before bootstrap/configuration
Change-Id: Id229a8de97f08ebca3aff04aa612cd922a73e9a6
2016-06-08 14:54:16 +00:00
Ricardo Carrillo Cruz aa5fee69b3 Reuse the puppet-openstackci zuul scheduler class
Rather than maintaining a composition of classes that makes
a zuul scheduler, just use openstackci::zuul_scheduler.

Change-Id: I0456c1b84e24d5bc868a7d07b8cda81004d129f4
2016-06-08 14:27:56 +00:00
Ricardo Carrillo Cruz 87280f92eb Add infra_config.yml to .gitignore
Change-Id: I02ed1882b6e1ff64a745a7f16001b61e62c10e96
2016-06-08 11:50:57 +02:00
Ricardo Carrillo Cruz 9d1db52a91 Change the old meta jenkins group to the expected 'jenkins' group
The code is switching from relying on metadata based groups to
dynamically created groups with add_host.
As such, the group containing jenkins is now 'zuul'.

Change-Id: I5958a9fda04255daa028aaf779a208bd517d44a6
2016-06-07 15:12:06 +00:00
Ricardo Carrillo Cruz 8383944786 Change the old meta zuul group to the expected 'zuul' group
The code is switching from relying on metadata based groups to
dynamically created groups with add_host.
As such, the group containing zuul is now 'zuul'.

Change-Id: Ia1336382b489f16a18ca00a67f985d41aad57319
2016-06-07 14:56:51 +00:00
Ricardo Carrillo Cruz ba3b591b86 Change the old meta gerrit group to the expected 'gerrit' group
The code is switching from relying on metadata based groups to
dynamically created groups with add_host.
As such, the group containing gerrit is now 'gerrit'.

Change-Id: I235e445f9e0f7e94f52a0c9dfc0df80b55d49bc1
2016-06-07 14:53:18 +00:00
Ricardo Carrillo Cruz 285f884691 Change the old meta puppetmaster group to the expected 'puppetmaster' group
The code is switching from relying on metadata based groups to
dynamically created groups with add_host.
As such, the group containing puppetmaster is now 'puppetmaster'.

Change-Id: Ic66a68fd7e873816ec27be37ce4842eea8268a47
2016-06-07 14:45:31 +00:00
Ricardo Carrillo Cruz 563123d788 Add generate infra dynamic inventory playbook/role
Some clouds may not have metadata enabled, or even have it but is
not reliable.
Force the user to define in infra_config.yml the services that make
up the OpenStack Infra cloud. This will be in a dict named 'services',
which will contain an entry for each OpenStack Infra service
(puppetmaster, zuul, nodepool, etc).

Change-Id: I9e3fe34684cd31bf1750ad8cf72e7e9090bfe087
2016-06-07 13:36:37 +00:00
Ricardo Carrillo Cruz efd0234300 Switch the provisioning step to the cloud launcher role
I've been slowly decoupling the provisioning role from infra-ansible
into its own role:

http://git.openstack.org/cgit/openstack/ansible-role-cloud-launcher

Now that it has feature parity and it is gating in OpenStack CI,
just use it and remove setup_openstack_resources roles.

Change-Id: I4810d0bdb57cf1f069f20fb133f5f2afe15e4e87
2016-06-07 13:35:47 +00:00
Ricardo Carrillo Cruz 973ecb7bac Remove bare variable from with_items
This is to avoid getting a deprecation warning

Change-Id: I7da86832d02b00c94d62c2188c2615c91fb7958b
2016-06-07 11:32:17 +00:00
Jenkins b01a320feb Merge "Add ansible.cfg file on repo to disable host key checking" 2016-06-07 10:23:43 +00:00
Jenkins 31453437b2 Merge "Fix the set_hostnames role when using default inventory behaviour" 2016-06-07 09:26:50 +00:00
Jenkins 74b1919a7e Merge "Fix sudo/become deprecation warnings" 2016-06-07 08:56:01 +00:00
Ricardo Carrillo Cruz 2e472697da Add ansible.cfg file on repo to disable host key checking
Change-Id: I8e08e8320afaf85cfe571fe35ed9f7fe02e3b227
2016-06-07 08:38:55 +00:00
Ricardo Carrillo Cruz 78d572d99e Fix sudo/become deprecation warnings
become is the keyword to use forward instead of sudo.

Change-Id: I1e29e3c37337ba999b2e8a970b688e4ec11ea579
2016-06-06 15:12:49 +00:00
Ricardo Carrillo Cruz dc6dcfb736 Fix the set_hostnames role when using default inventory behaviour
Some time ago, the openstack inventory would show have as hostvars
id the server name.
That behaviour changed, and now the id is the server uuid, which
breaks the set_hostnames logic.
This change fixes it.

Change-Id: Ie958a9d04fdfeabfab64100e43a4ead44b82a7b8
2016-06-06 14:22:17 +00:00
Ricardo Carrillo Cruz cd59a0e396 Do not validate the download of the puppet package
It is complaining about the cert, thus disabling cert
validation.

Change-Id: I646c5760acab47bb2867a5e3cc0e0b6b77fe143d
2016-06-06 12:35:52 +00:00
Jenkins b022c4d1e4 Merge "Reworked setup_env.sh to support Debian & Darwin/OSX" 2016-04-12 00:35:31 +00:00
Arie Bregman c0e5dc9782 Fix tiny styling issue
Ensure variable substitution looks like this: {{ variabe }}

Change-Id: I09f788e1a2647db4c03412180c8d00417f7260d3
2016-03-22 10:08:19 +02:00
Jenkins 40699f1257 Merge "Add keypairs to infra_config sample and option to use key file" 2016-03-22 07:41:17 +00:00
Arie Bregman 1dedd44700 Add keypairs to infra_config sample and option to use key file
At the moment 'keypairs' isn't defined anywhere. It was added
to infra_config.yml.sample to help users define it.

Also, key_public_file variable was added to 'Create keypairs'
task, to allow users specify key_public_file instead of key
content.

Change-Id: I414aeeaee9c38bdbfe7e5607cb756f08335ac42c
2016-03-21 12:12:56 +02:00
Arie Bregman bf38ef8f1f Fix run_puppet_on_*.yml files
Remove duplicated tasks line.

This is also reported when runnning: ansible-playbook --syntax-check.

Change-Id: Iad7b205418b57e6f38f2c4851ec2624a93689539
2016-03-20 17:14:39 +02:00
Simon McCartney e49b679956 Reworked setup_env.sh to support Debian & Darwin/OSX
* Linux/Debian - ensure python-pip & python-dev are installed
* LinuxRHEL/CentOS - ensure python-virtualenv & python-devel are
  installed
* Darwin/OSX - check & exit if pip not installed
* Always rebuild the venv
* Dropped the path on wget, to allow for platform path differences
* Dropped the -N on wget, as it has no effect when using -O and
  github aren't returning the Last-Modified header

Change-Id: I221965ee1b1776d46f4b6fba00ffb7069e5b34f8
2016-03-12 23:10:46 +00:00
Jenkins 1148bdb4d4 Merge "Ignore <playbook>.retry files on git" 2016-03-07 21:59:01 +00:00
Ricardo Carrillo Cruz 29523dba68 Set validate_certs defaulting to no on all resources creation
Change-Id: I3f840ab56374fe07215a1cdfa66a186c60a19e4a
2016-02-17 12:35:03 +01:00
Ricardo Carrillo Cruz 50ccb8c835 Create and attach other required openstack resources
Rather than expecting a user to create keypair prior to run
infra-ansible, just make infra-ansible to create the keypair
per the variable passed as keypair_contents on infra_config.yml.
Role provision_infra_servers not only creates instances, but also
volumes and now kepairs, thus also renaming the provision_infra_servers
role and playbook to setup_openstack_resources.

Change-Id: I810edf1b8956d2f5653aa789ce908428c2904549
2016-02-16 15:08:10 +01:00
Jenkins ab9554c77f Merge "Refactor setup_env.sh to use virtualenvs" 2016-02-16 08:12:54 +00:00
Ricardo Carrillo Cruz d902c16e19 Refactor setup_env.sh to use virtualenvs
Rather than relying on system-wide packages, just
create the virtualenv and leverage the already available
requirements.txt, which installs ansible along with other
dependencies.
Also pull the openstack inventory in the local inventory folder
as ansible pip package does not bundle the inventory utility.

Change-Id: I43b1c3fce522657854cdc20c55bd32366179b4b7
2016-02-15 16:28:10 +01:00
Ricardo Carrillo Cruz e19fd1e07b Ignore <playbook>.retry files on git
We don't want to track this on git, thus putting them
on .gitignore

Change-Id: I21e7140e9cecf52891f8f77f1be3ab2146115ab4
2016-02-15 13:46:23 +01:00
Ricardo Carrillo Cruz 5ae82e5d64 Pin ansible package to stable 2.0.0.2
Devel was giving random YAML parsing problems, let's better
just use 2.0.0.2 now that is available on PyPI.

Change-Id: Ife63d861489d24ab746043f421c3190edfe6b507
2016-02-15 12:46:32 +01:00
Jenkins 44d6d10800 Merge "Use virtualenv python binary" 2016-02-12 12:16:36 +00:00
Jenkins c0a4b7f09a Merge "Remove unused docker-py dependency" 2016-02-12 12:16:30 +00:00
Ricardo Carrillo Cruz 9c3c6e11c3 Use virtualenv python binary
When infra-ansible runs in a virtualenv, this line is needed in
order to use the python binary installed in the virtualenv,
otherwise the system-wide is used and you can get dependency issues
due to missing packages on site-packages that are available
on the virtualenv.

Change-Id: I3af50d734ff5d18eee73b124840db9683dc708dd
2016-01-15 09:15:19 +01:00
Ricardo Carrillo Cruz 7434c9ab2f Remove unused docker-py dependency
This was added a while ago as I had plans to make infra-ansible
working on Docker, besides OpenStack provisioning mechanism
already available.
As that effort never came, remove for now.

Change-Id: I7f382139ab43331e7aa6a05592c2690874881484
2016-01-15 09:13:02 +01:00
Ricardo Carrillo Cruz 06a30d5f71 Remove shade-ansible from pip requirements
This is no longer needed by Ansible, just shade library

Change-Id: I928cfa16fff6c948263eac3beb4f1458acfc2b38
2016-01-15 09:11:57 +01:00
Ricardo Carrillo Cruz c46fc9b5fd Attach volumes defined on servers stanzas
This change will attach the volumes to the servers defining them.

Change-Id: Iea58103e3d640f70891a2a8fcc16af26d79407ca
2015-11-04 10:26:47 +01:00
Ricardo Carrillo Cruz 76a9301314 Fix volume creation for instances not having volumes defined
If we don't have the skip_missing: yes, the task will fail on
infra_servers that do not have any volume defined.

Change-Id: I9b067da57a2869568f2ddbbd495e50ed6259429b
2015-10-16 15:10:41 +02:00
Ricardo Carrillo Cruz cb16f959b7 Add initial support for creating volumes
For some services it may be desirable to have instances using
cinder volumes, this change allows to define that in the
infra_config.yml inventory and the provision_infra_servers
will create them.
A follow-up patch will attach the volumes defined on each instance.

Change-Id: I28d187569655fbbc45cec0bce771ce8adab1f4dd
2015-10-15 17:37:48 +02:00
Ricardo Carrillo Cruz 3e3a3b0ff0 Add tox env for ansible syntax check
Looks like the tox macro on project-config requires an env,
thus creating a specific one to infra-ansible tox.ini.
When this lands, I will amend the change on project-config
that adds tox to have envlist value 'ansible-syntax-check'.

Change-Id: Ide54e9d4b614cc687bed293a7835d6055212f7f8
2015-10-07 11:02:59 +02:00