Commit Graph

4093 Commits

Author SHA1 Message Date
Lucas Alvares Gomes
45173ccdb5 Adds support for post-install scripts.
Post install scripts are useful because they can perform tasks you want
to handle after the OS/application install but before the first boot
of the image. e.g: Clean the cache left by the package manager reducing
the size of the image.

Change-Id: I03e77f602192bbdce29c02999d1b57fac8051ddc
Fixes: Bug #1145786
2013-04-17 09:47:51 +01:00
Jenkins
26ba473c72 Merge "Migrate cloud image URL/Release options to DIB_." 2013-04-12 19:59:19 +00:00
Jenkins
2c442c5b02 Merge "Grab the next available /dev/nbdX." 2013-04-12 19:59:18 +00:00
Lucas Alvares Gomes
b20e133714 Grab the next available /dev/nbdX.
Change-Id: I6a2c8e58cdab889d747e870d0009f51bba0ff148
2013-04-12 17:49:23 +01:00
Devananda van der Veen
8a22115c6d Allow build dir to be changed from /tmp
Adds an env var TMP_DIR which will override mktemp's default location.

Fixes bug 1168432

Change-Id: I60c63389bb2a639f948e7e96bf9aaea0ea73e27d
2013-04-12 07:43:53 -07:00
Chris Jones
a8312db742 Migrate cloud image URL/Release options to DIB_.
This switches $CLOUD_IMAGES and $RELEASE to the DIB_ namespace so
they will survive future changes to the sanitisation of the build
environment.

Change-Id: I7dc2aa82fb9ef452705b080cc404f41046014f20
2013-04-12 14:48:54 +01:00
Jenkins
66b563e466 Merge "Introduce the DIB_ namespace for build-time config." 2013-04-12 09:38:43 +00:00
Chris Jones
bd1bae7c58 Introduce the DIB_ namespace for build-time config.
Document the use of DIB_ as a prefix on environmental variables that can
be overridden at build time.

Introduce the first such variable by migrating IMAGE_SIZE to
DIB_IMAGE_SIZE.

Change-Id: Ie36b734991b913a23f37f2add47d470d7c1576e4
2013-04-12 09:50:34 +01:00
Tim Miller
9eda303f5f Fedora element allows root to sudo without TTY.
The root user tries to `sudo -u stack`, without a tty,
causing fedora+devstack images builds to fail in Jenkins.

Change-Id: Ia0a7fb315cf9bd17cf250e70dba06363a697c97c
2013-04-09 16:46:16 -07:00
Jenkins
169382246b Merge "Generate ssh hostkeys on first-boot." 2013-04-09 20:54:15 +00:00
Tim Miller
21e3fb185c Generate ssh hostkeys on first-boot.
cloud-init is expected to generate unique hostkeys on first
boot, but sometimes it doesn't.

This change ensures that hostkeys are always generated.
This change should be removed if the cloud-init problem is solved.

Change-Id: I7d7e05fbd12727992cf1aebec547ae0488e002ff
2013-04-09 11:18:02 -07:00
Robert Collins
5ada82a59c Add armhf support.
ARM doesn't have a generic Linux image due to the soc-specific nature of Linux
kernels today, so we drop the manual installation of that package, replacing it
with a dist-upgrade instead. This involved tweaks to the dpkg and fedora
install-package scripts.

Change-Id: I97924b80ca87781307e1087b9fe4b18215770e84
2013-04-09 08:17:22 +12:00
Robert Collins
24c89932be Always include the in-tree elements directory.
Change-Id: I5a79fbf0568f5755dd14824ed147093387170b3f
2013-04-08 10:26:44 +12:00
Robert Collins
e826e77a16 Delete elements moved to tripleo-image-elements.
Change-Id: I062d3dfb538682d72011307e8b96672e8f0844a5
2013-04-07 07:08:00 +12:00
Chris Jones
ddcf3db028 Update README.md for build-time state capture
Document the existence and genesis of /etc/dib_{environment,arguments}

Change-Id: I99e696b87230d3b45ae1d37ee0de3742f407f0ce
2013-04-05 10:00:52 +01:00
Jenkins
a400a5e00a Merge "Store build-time settings" 2013-04-04 20:56:22 +00:00
Jenkins
c75d89128b Merge "Fix mysql migration script to handle errors." 2013-04-04 20:39:51 +00:00
Jenkins
0dceb774e4 Merge "Remove strict sql_mode setting which breaks apps." 2013-04-04 20:39:50 +00:00
Clint Byrum
ca8a663707 Fix mysql migration script to handle errors.
Errors in mysqldump would have been missed due to not having pipefail
set. Also there was a type-o in the invocation of mysqldump that was
going undetected, that has been repaired. Finally we should not pass
--master-data if we don't have slave credentials, as the master data,
even if provided, is useless without a valid slave user/pass.

Change-Id: I0f80af34c747f465250ef17fae4a44dac919c9cd
2013-04-04 13:07:38 -07:00
Clint Byrum
352516381f Remove strict sql_mode setting which breaks apps.
Strict sql_mode settings are very application specific, many will simply
not work with them. This setting was likely inherited from some other
production MySQL config file and is not appropriate for a generic
configuration. Specifically, this broke the MySQL package maintainer
scripts.

Change-Id: I068fcc7b3c770541d3d1ecfb372384750f182584
2013-04-04 13:07:38 -07:00
Clint Byrum
a18a5c85ff Do not require arguments for os-svc-daemon.
They are not actually required, so allow os-svc-daemon to be called
without them.

Change-Id: I62c2887d48e4173005c54c9cab4ecd6aff8069a1
2013-04-04 13:05:43 -07:00
Chris Jones
0cfecd1024 Store build-time settings
This will write two files in /etc/ that contain the environment and
command line arguments used in the creation of an image. This should
assist with later efforts to repeat the creation of an image.

Change-Id: Icdbe6693380bed6c406feee10d2cb1a88a992932
2013-04-04 20:39:11 +01:00
Jenkins
ef7d0307ff Merge "Migrate data into MySQL from bootstrap." 2013-04-04 19:22:21 +00:00
Jenkins
4e36ae9eb9 Merge "Run os-config-applier using os-refresh-config." 2013-04-04 19:19:40 +00:00
Jenkins
2e0e1210bf Merge "Bring os-svc-install element docs up-to-date." 2013-04-04 19:18:10 +00:00
Tim Miller
b196f1bb3d Disable tunneling in quantum-ovs.
Quantum-ovs was continually re-creating interfaces
every second or so, because it was configured to use tunneling,
and the default version of OVS included with ubuntu does
not support tunneling.

Change-Id: I1246181c4b9c96ebe2795b337454dc8ddcb35e8f
2013-04-04 11:58:20 -07:00
Clint Byrum
948347131f Migrate data into MySQL from bootstrap.
Use Heat Metadata to specify host and credentials to pull whole database
snapshot and setup Replication. Also include root credentials for use after
the snapshot has been applied.

Change-Id: Ie3aa92463d28db54a523f520c2b4cdfb528acf9d
2013-04-04 11:12:09 -07:00
Clint Byrum
3ace1ba29e Run os-config-applier using os-refresh-config.
There's no need to run os-config-applier at any time except when
os-refresh-config is in its configure state.

Change-Id: Id9758294c60469a976b61c68fc26d9b83130599a
2013-04-04 11:12:09 -07:00
Tim Miller
e4e4989e18 Bring os-svc-install element docs up-to-date.
Change-Id: Ia0547de1a899359994706d1607ed19e5ad5c056f
2013-04-04 09:37:25 -07:00
Tim Miller
f501494bce Enable use_namespaces setting for quantum agents.
Change-Id: I060c381cc9dc858a979e072b78bde6a55ad69472
2013-04-03 21:28:48 -07:00
Tim Miller
00114f6e90 Clearly mark unaudited config templates as such.
Change-Id: I130b0874b2efad1345bb5449bce001985c477960
2013-04-03 21:28:33 -07:00
Jenkins
3df85839e5 Merge "Streamline upstart scripts in os-svc-daemon" 2013-04-04 02:48:05 +00:00
Jenkins
3ea3696c8f Merge "Add a nova-baremetal element." 2013-04-04 02:40:42 +00:00
Tim Miller
123cc109e2 Replace glance-api+glance-reg elements with glance:
'glance' element now results in a properly-configured,
working glance service on first boot.

While glance-api and glance-reg may need to be broken
out again in the future, the intention now is to focus
on a working service for an end-to-end PoC.

Change-Id: I4fb1cd5ad6defef5a5c4fddfded46d51e8097b5a
2013-04-03 19:37:15 -07:00
Jenkins
4c986076ac Merge "Add a quantum element." 2013-04-04 02:15:12 +00:00
Jenkins
2ea0430acb Merge "Add element to run DHCP on all network interfaces." 2013-04-04 01:58:08 +00:00
Clint Byrum
4762f65dc1 Streamline upstart scripts in os-svc-daemon
Best practice is to use start-stop-daemon rather than sudo, as sudo will
apply user-centric pam limits and create a wtmp entry. Also there is no
need for a script stanza, as we are only execing one command.

Change-Id: I0c2f12536b56d90fd43ab40e74424350efcc0b61
2013-04-03 11:32:17 -07:00
Tim Miller
0809886571 Add a nova-baremetal element.
Future work is intended to allow this to serve
as a nova-virt element as well, by allowing the config
and which services are run (such as bm-deploy-helper)
based upon metadata config settings.

Change-Id: I59718a0b329e6adc59097492638cf02c76162c0a
2013-04-03 10:45:28 -07:00
Jenkins
3211e6d277 Merge "Remove duplicate file extensions." 2013-04-03 10:02:00 +00:00
Tim Miller
7e36570519 Add a quantum element.
Change-Id: I1008dcbb4e0a6c4cc25f4cc11a90fbc265ab2fdd
2013-04-02 19:29:07 -07:00
Tim Miller
ea57869d3e Run all openstack services in virtualenvs:
Python package dependency conflicts have been observed
to occur for certain combinations of services at certain
revision.

Running all services in virtualenvs removes the issue.

Change-Id: I100817569b43a5af3427b0ae20cebdc7d55d03a5
2013-04-02 18:13:07 -07:00
Chris Jones
a6b794fffc Add element to run DHCP on all network interfaces.
Ensures that all network interfaces are present in
/etc/network/interfaces. Any interface not already defined there
will be added and configured for DHCP.

Change-Id: I27e0902e62804e8d719acd7288109bd0e294fd16
2013-04-02 10:28:18 +01:00
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