From 3b96f2582a77a0f7b9757de1fcc12eb538fd31a0 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 23 Jul 2014 15:35:38 +0000 Subject: Remove all the OpenStack specific systems --- openstack-client-base-system-x86_32-generic.morph | 18 ------------------ openstack-client-base-system-x86_64-generic.morph | 18 ------------------ 2 files changed, 36 deletions(-) delete mode 100644 openstack-client-base-system-x86_32-generic.morph delete mode 100644 openstack-client-base-system-x86_64-generic.morph diff --git a/openstack-client-base-system-x86_32-generic.morph b/openstack-client-base-system-x86_32-generic.morph deleted file mode 100644 index 21b60aff..00000000 --- a/openstack-client-base-system-x86_32-generic.morph +++ /dev/null @@ -1,18 +0,0 @@ -arch: x86_32 -configuration-extensions: -- set-hostname -- add-config-files -- simple-network -- nfsboot -- install-files -- vdaboot -description: The set of strata required to have a minimal system for a 32-bit x86 - system suitable in OpenStack. -kind: system -name: openstack-client-base-system-x86_32-generic -strata: -- morph: build-essential -- morph: core -- morph: foundation -- morph: bsp-x86_32-generic -- morph: cloudinit-support diff --git a/openstack-client-base-system-x86_64-generic.morph b/openstack-client-base-system-x86_64-generic.morph deleted file mode 100644 index 977e1fbc..00000000 --- a/openstack-client-base-system-x86_64-generic.morph +++ /dev/null @@ -1,18 +0,0 @@ -arch: x86_64 -configuration-extensions: -- set-hostname -- add-config-files -- simple-network -- nfsboot -- install-files -- vdaboot -description: The set of strata required to have a minimal system for a 64-bit x86 - system suitable in OpenStack. -kind: system -name: openstack-client-base-system-x86_64-generic -strata: -- morph: build-essential -- morph: core -- morph: foundation -- morph: bsp-x86_64-generic -- morph: cloudinit-support -- cgit v1.2.1 From 456c61ebd415395c0232614489d7563da73f337b Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 23 Jul 2014 15:30:56 +0000 Subject: Use a cloud-init version with the services disabled by default Now adding cloud-init to a system will be harmless and it can be enabled with a configuration extension during the deployment. --- cloudinit-support.morph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudinit-support.morph b/cloudinit-support.morph index a1076006..1790ab8c 100644 --- a/cloudinit-support.morph +++ b/cloudinit-support.morph @@ -44,7 +44,7 @@ chunks: build-depends: [] - name: cloud-init repo: upstream:cloud-init - ref: eeb4923b3528ebf4d93d8297b2d489738c3ea7c3 + ref: 130d51acc5b0becd64e7007f9dfe41a6e022eaec unpetrify-ref: baserock/morph build-depends: - boto -- cgit v1.2.1 From c2d020effb7cd2e45d75212686ba05c315fa3a70 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 23 Jul 2014 13:54:10 +0000 Subject: Add cloud-init.configure extension --- cloud-init.configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 cloud-init.configure diff --git a/cloud-init.configure b/cloud-init.configure new file mode 100755 index 00000000..0dd53654 --- /dev/null +++ b/cloud-init.configure @@ -0,0 +1,50 @@ +#!/bin/sh +# +# Copyright (C) 2014 Codethink Limited +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# +# This is a "morph deploy" configuration extension to enable the +# cloud-init services. +set -e + +ROOT="$1" + +########################################################################## + +set -e + +case "$CLOUD_INIT" in +''|False|no) + exit 0 + ;; +True|yes) + echo "Configuring cloud-init" + ;; +*) + echo Unrecognised option "$CLOUD_INIT" to CLOUD_INIT + exit 1 + ;; +esac + + +ln -sf /lib/systemd/system/cloud-config.service \ + "$ROOT/etc/systemd/system/multi-user.target.wants/cloud-config.service" +ln -sf /lib/systemd/system/cloud-init-local.service \ + "$ROOT/etc/systemd/system/multi-user.target.wants/cloud-init-local.service" +ln -sf /lib/systemd/system/cloud-init.service \ + "$ROOT/etc/systemd/system/multi-user.target.wants/cloud-init.service" +ln -sf /lib/systemd/system/cloud-final.service \ + "$ROOT/etc/systemd/system/multi-user.target.wants/cloud-final.service" -- cgit v1.2.1 From 1f7ae3f064e5a1c8219f45f0e5b82256ed8244c7 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 23 Jul 2014 17:54:16 +0100 Subject: Add cloud-init support to some x86 systems (base, devel and Trove) This includes: - Add cloudinit-support stratum to the systems - Add cloud-init configuration extension to the systems --- base-system-x86_32-generic.morph | 2 ++ base-system-x86_64-generic.morph | 2 ++ devel-system-x86_32-generic.morph | 2 ++ devel-system-x86_64-generic.morph | 2 ++ trove-system-x86_64.morph | 2 ++ 5 files changed, 10 insertions(+) diff --git a/base-system-x86_32-generic.morph b/base-system-x86_32-generic.morph index e53b2d97..ab535ea0 100644 --- a/base-system-x86_32-generic.morph +++ b/base-system-x86_32-generic.morph @@ -5,6 +5,7 @@ configuration-extensions: - simple-network - nfsboot - install-files +- cloud-init description: The set of strata required to have a basic system for a 32-bit x86 system. kind: system @@ -14,3 +15,4 @@ strata: - morph: core - morph: foundation - morph: bsp-x86_32-generic +- morph: cloudinit-support diff --git a/base-system-x86_64-generic.morph b/base-system-x86_64-generic.morph index 183e331e..36332d42 100644 --- a/base-system-x86_64-generic.morph +++ b/base-system-x86_64-generic.morph @@ -5,6 +5,7 @@ configuration-extensions: - simple-network - nfsboot - install-files +- cloud-init description: The set of strata required to have a minimal system for a 64-bit x86 system. kind: system @@ -14,3 +15,4 @@ strata: - morph: core - morph: foundation - morph: bsp-x86_64-generic +- morph: cloudinit-support diff --git a/devel-system-x86_32-generic.morph b/devel-system-x86_32-generic.morph index 28c89447..5eac853a 100644 --- a/devel-system-x86_32-generic.morph +++ b/devel-system-x86_32-generic.morph @@ -5,6 +5,7 @@ configuration-extensions: - simple-network - nfsboot - install-files +- cloud-init description: A system that is able to build other systems based on the 32-bit x86 architecture. kind: system @@ -16,3 +17,4 @@ strata: - morph: bsp-x86_32-generic - morph: tools - morph: openstack-clients +- morph: cloudinit-support diff --git a/devel-system-x86_64-generic.morph b/devel-system-x86_64-generic.morph index 1daa45d2..2100221e 100644 --- a/devel-system-x86_64-generic.morph +++ b/devel-system-x86_64-generic.morph @@ -5,6 +5,7 @@ configuration-extensions: - simple-network - nfsboot - install-files +- cloud-init description: A system that is able to build other systems based on the 64-bit x86 architecture. kind: system @@ -16,3 +17,4 @@ strata: - morph: bsp-x86_64-generic - morph: tools - morph: openstack-clients +- morph: cloudinit-support diff --git a/trove-system-x86_64.morph b/trove-system-x86_64.morph index e65b0540..fb892d81 100644 --- a/trove-system-x86_64.morph +++ b/trove-system-x86_64.morph @@ -6,6 +6,7 @@ configuration-extensions: - fstab - simple-network - install-files +- cloud-init description: Trove server kind: system name: trove-system-x86_64 @@ -18,3 +19,4 @@ strata: - morph: trove - morph: nfs - morph: ansible +- morph: cloudinit-support -- cgit v1.2.1