Commit Graph

90 Commits

Author SHA1 Message Date
Clint Byrum
ff7eac3c65 Create users in mysql server based on metadata
Enable templates to specify a list of users that need passwords assigned
in Metadata. These passwords are then communicated back to the template
via an optional wait condition handle using cfn-signal.

Change-Id: Iaaf4d4a9d0d757b7d44ea39e77eed3c55ffffd88
2013-04-02 01:34:32 +00:00
Clint Byrum
6bf07b12d3 Set mysql server_id based on instance-id
Do nothing if we are booted on a server which has no instance-id set,
such as a non-cloud VM or server.

Change-Id: I6df81edbea1b2b4e4f1ef11a9f2ddaf100d98eda
2013-04-02 01:32:23 +00:00
Clint Byrum
72534d6eba Refactor mysql element to do less in first-boot.d
We didn't need to do most of this anyway, we just needed to configure
mysql before we installed the packages in the image. Some of the other
things were half-baked ideas which will come in later changes to add
os-refresh-config and os-config-applier support to the element.

Change-Id: Ib1b66a8b3b70fac10f3f826b1efd414c67f9bfc6
2013-04-02 01:31:40 +00:00
Clint Byrum
a28a1be2c3 Adding cfn-credentials file to heat-cfntools
Change-Id: Icd9f0e24700d8016169682f86d5004ec1486c463
2013-04-02 01:29:11 +00:00
Jenkins
51f003bf2f Merge "remove unnecessary '/usr/local/bin' from install.d." 2013-04-01 22:35:51 +00:00
Tim Miller
3a2f482c9d remove unnecessary '/usr/local/bin' from install.d.
Change-Id: Idda511dbf26c1562d8993bc5bbda6756ce796546
2013-04-01 15:18:41 -07:00
Tim Miller
f2ad365039 Install os-config-applier from stackforge repo.
Change-Id: Ic383750856e23957fe6bd0ee65767efa26021028
2013-04-01 15:17:03 -07:00
Jenkins
12e86eb657 Merge "Fix os-refresh-config failing without scripts." 2013-04-01 20:37:56 +00:00
Robert Collins
c6ff2fcade Switch to using the incubator-bootstrap tree.
Incubator is having dangerous scripts removed from it.

Change-Id: I5567b9b89eeed4dbf124186a84a7d890eefc87ef
2013-03-29 14:01:32 +13:00
Clint Byrum
d5f7d7e7c0 Fix os-refresh-config failing without scripts.
It is valid to request os-refresh-config without putting any scripts in
the element root. This fixes failing builds of heat-cfntools.

Change-Id: I4f70b33e453399ff5baa48919557995a6eb27520
2013-03-21 18:11:22 -07:00
Tim Miller
5b99028acf Correctly translate all branches/tags/shas:
The code which raises an error if two elements try
to install different versions of the same git repo
currently works correctly for SHAs, or if a branch
is specified first, followed by a SHA.

However it fails if two branches are specified, because
the shallow clone does not fetch all branch heads.

This change correctly handles any combination of
SHAs/branch-heads/tags.

Change-Id: I501e94150ddeb41b79588816576a5d7a06fa92aa
2013-03-12 11:59:18 -07:00
Jenkins
c1bf047d39 Merge "Fix script that installs os-refresh-config scripts" 2013-03-12 01:22:26 +00:00
Tim Miller
e56b0de321 Update keystone middleware in cinder api-paste:
cinder-api in trunk will no longer start with
keystone.middleware, only with keystoneclient.middleware.

The issue is discussed here:
  https://bugs.launchpad.net/nova/+bug/1143998

Change-Id: I29f81ca2503957b4df58e86b2392ef4b3c15d6fe
2013-03-09 01:38:07 -08:00
Clint Byrum
a99584d0f9 Fix script that installs os-refresh-config scripts
Was missing executable bits

Change-Id: Idcb984e44f4b45d78c59a45eb0d8d43457c788c9
2013-03-08 23:06:02 -08:00
Clint Byrum
4da169ce6e local-config: Configure proxy for apt and/or yum
Fixes fail to build image on Fedora

Change-Id: I30324081702ffc68e82499d81a841c8ae17119ce
2013-03-08 03:24:45 -08:00
Jenkins
28aa222b20 Merge "Fix issues causing Fedora images to fail" 2013-03-08 03:06:27 +00:00
Jenkins
21720c6acd Merge "Update keystone element to use os-refresh-config." 2013-03-08 03:04:56 +00:00
Jenkins
b554030787 Merge "Install os-refresh-config scripts automatically" 2013-03-08 00:34:40 +00:00
Clint Byrum
597575c681 Fix issues causing Fedora images to fail
For os-refresh-config and os-config-applier, support systemd or upstart.

Change-Id: I4ff12e891a85b3171a6ef0c6898b2d45a1699de1
2013-03-07 14:17:41 -08:00
Tim Miller
6cfd9681b7 Seperate install of services and start scripts:
This allows openstack services to be git/pip installed
without installing any startup scripts.

This is useful for keystone-db or nova-db elements, for
example, where the service must be installed to perform
database migration, but no service start scripts need
be installed.

Additionally, add a tool to create openstack sql databases.

Use openstack pypi mirror:

Use the openstack pypi mirror for openstack service
installation. It's much faster than pypi.org.

Also, pip install $svc_repo/tools/pip-requires first,
if it exists, which is required to pick up oslo.config.

Change-Id: I72751d4da59f8597d20aea2f27a9dfabe2f63a8f
2013-03-07 11:45:41 -08:00
Tim Miller
abbd8a61a8 Update keystone element to use os-refresh-config.
Change-Id: I15595d80ee7fad04d964aaa83a403d9303f6aa55
2013-03-06 16:31:30 -08:00
Tim Miller
8346115bf9 Make 99-install-config-templates executable:
This script is not run by dib unless it is executable.

Change-Id: Ic7658cd229dba5635a4ea445f0c62d9f22198729
2013-03-06 13:37:20 -08:00
Clint Byrum
91351658b3 Install os-refresh-config scripts automatically
Updating the cinder element to reflect the new desired way to ship
os-refresh-config scripts.

Change-Id: Ibde1275725241204f6097ad7cc0ba0de5e6cd431
2013-03-06 11:23:59 -08:00
Jenkins
9215817ec9 Merge "Integrate os-refresh-config with heat-cfntools" 2013-03-06 00:43:53 +00:00
Tim Miller
b880ef9017 local-config element adds authorized_key for root:
Currently, the local-config and stackuser elements
are intertwined.  local-config installs an authorized_key
for stackuser, if the stackuser element is in use.

This change does two things:
- add authorized_key for root from local-config element,
    regardeless of whether stackuser element is in use.
- install key for stack user from stackuser element,
    only if local-config element is in use.

Change-Id: I0d07b61404119ea0650c5c0fb98d6786adcf3ca9
2013-03-05 15:52:03 -08:00
Clint Byrum
2b29ca6183 Integrate os-refresh-config with heat-cfntools
* Provide entry point for Heat Metadata to drive os-refresh-config
* Use os-config-applier for configuring heat cfn tools

Change-Id: Ie38b932173948f1e7c414c48caa1b037916bef84
2013-03-05 14:45:41 -08:00
Clint Byrum
30e803aa56 Allow elements to include skeleton config
Copies all templates found in the root of any element into the
default template location.

These templates will be filled in from heat metadata by
os-config-applier whenever it is run.

Update keystone to install templates in this way as an example.

Change-Id: I0be0a79a431e9ba5b80e84f130c48d5ce8b100ae
Co-Authored-By: Tim Miller <tim.miller.0@gmail.com>
2013-03-05 12:01:39 -08:00
Tim Miller
aa8a2174a6 Add a cinder element.
Change-Id: I4729cf003896c3b4f8267d16e1b4822099231051
2013-02-28 17:09:30 -08:00
Jenkins
07c476b590 Merge "Fix heat-cfntools to work on Fedora" 2013-02-28 05:19:47 +00:00
Clint Byrum
cc4b23aafa Namespace SHA256SUMS file to distro/release/arch
Its possible other images will want to use the same filename

Change-Id: Iae393bfc71205d39e2bc6e12f5524824607d6101
2013-02-27 20:30:14 -08:00
Clint Byrum
614b6af62f Fix heat-cfntools to work on Fedora
Also add redhat-lsb to Fedora images for lsb_release which should prove
useful as a way to do distro-specific things.

Change-Id: Ie32566349319ca244fa02065bb9f81c36c1b49fb
2013-02-27 18:15:08 -08:00
Clint Byrum
b2314243c6 Verify Ubuntu Cloud Images using SHA256SUMS
Relies on https://cloud-images.ubuntu.com being served by a cert signed
by one of the CA's trusted by the build host.

Change-Id: I690b755acca54789110c2c8fa723c8b87b2485c9
2013-02-27 15:31:56 -08:00
Jenkins
0bbea74583 Merge "Don't use sudo in base." 2013-02-27 20:26:01 +00:00
Tim Miller
7d1a4adc17 Specify os-refresh-config path in README.
Change-Id: I1cf9569ae805c070f13a582d376665f2e8976ffc
2013-02-26 20:12:09 -08:00
Robert Collins
2b5557ea30 Don't use sudo in base.
Install.d hooks are already root, we don't need plain sudo there.

Change-Id: I69747049b2f5f649eb503a24487bbb3a4151ae21
2013-02-27 15:51:10 +13:00
Jenkins
b917233a24 Merge "Devstack element pulls from master." 2013-02-27 00:02:31 +00:00
Jenkins
b509dbbd0e Merge "Install heat-cfntools from pypi" 2013-02-27 00:02:24 +00:00
Tim Miller
dc845466bc Add an openstack all-openstack-db element:
This element installs all openstack sql databases into
a single image, useful for a bootstrap image.

Change-Id: I6efe807793ec620a60d5798d28a7e3103a5b90e8
2013-02-25 17:09:37 -08:00
Devananda van der Veen
aa9f447770 Devstack element pulls from master.
Devstack element pulls devstack from trunk
instead of from the tripleo fork.

Change-Id: Ie5b1c325b2464cf1195e8e79857bdea27f9847a2
2013-02-25 16:33:49 -08:00
Steve Baker
48e22d91b6 Run alternatives pip -> pip-python
Checks to see if python-pip is installed and installs
an alternatives link at /usr/bin/pip

Change-Id: I858ac2597d3cacc79144a8b345faf6a2f7dee26e
2013-02-22 12:44:24 +13:00
Steve Baker
bdc5759740 Install heat-cfntools from pypi
Then creates symlinks into /opt/aws/bin using the included script.

This replaces the heat-jeos element, so anything that references heat-jeos will need to be replaced with heat-cfntools

Change-Id: Id286b005f69ea364357303b4bbc1ed29d4f0f8f9
2013-02-22 09:08:43 +13:00
Robert Collins
f42cb641bf Fedora needs to depend on dib-run-parts too.
Change-Id: I56611d1c2bf13c8d24a87869bf8334d8e4992f6f
2013-02-15 15:34:09 +13:00
Jenkins
210e69779b Merge "Give stack user passwordless sudo:" 2013-02-15 02:12:47 +00:00
Robert Collins
9afddcf266 New element that uses a fedora cloud image as the base.
Change-Id: I7d83bb2b359e7a8c3858eca04c96e35cf4e1fe9e
2013-02-15 09:33:29 +13:00
Clint Byrum
91c30f6ab2 Use dib-run-parts for running scripts in target
Also modified dib-run-parts to apply a more workable solution for
filtering out unwanted files such as editor backups and VCS.

The script is installed in its own element, depended on by the OS
specific ubuntu element. This is  because the ubuntu element (and
later other OS's) are responsible for populating the root filesystem.
If we try to install this in base, the root filesystem will look to
be populated already and we will skip automatically choosing ubuntu.

Change-Id: I017646748c1a8360299106289b57d976d45875a8
2013-02-14 10:48:10 -08:00
Jenkins
3ce071c894 Merge "Move the dpkg specific stuff to a dpkg element rather than being hardcoded." 2013-02-14 18:28:55 +00:00
Clint Byrum
d84a2fa246 Work in progress run-parts replacement.
Change-Id: Ie95b3ed2145594b5f6436454a6756012fc1c4729
2013-02-13 16:41:27 -08:00
Robert Collins
7f77729ec5 Move the dpkg specific stuff to a dpkg element rather than being hardcoded.
This includes the install-packages implementation for dpkg, apt http proxy
config, daemon blocking and unblocking.

Change-Id: I8f159021d2b223d7003cec067de3aa605ad06974
2013-02-14 11:16:12 +13:00
Tim Miller
9806b6e737 Give stack user passwordless sudo:
This is very helpful when performing automation.

Additionally, removed addition of stack user to admin group,
since that group does not exist on all systems, and
passwordless sudo eliminates the need it was addressing.

Change-Id: I727bd51acb920c6c2e66247069998b6ee4267895
2013-02-13 12:18:50 -08:00
Tim Miller
56e50ee5cf Consolidate common OS installation into a script:
Move common openstack service installation operations
into a new script `os-svc-install`, which simplifies
the elements for openstack services.

Change-Id: Ied8ac3278e7fe8af76e24748ec4e598a84afa03c
2013-02-13 11:06:00 -08:00