summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-12-15 12:02:09 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-12-15 15:38:44 +0000
commit4ee510e1f6ec84883ca72f9aaa3ac20db58a2554 (patch)
tree8cd87a57f6e32f1830b14a4b30646297ad8dd588
parenta64eb8684f10bc212198e9fdfe5fb8934411281a (diff)
downloaddefinitions-4ee510e1f6ec84883ca72f9aaa3ac20db58a2554.tar.gz
Add an example cluster morphology for mason
-rw-r--r--clusters/mason-system-x86_64-openstack-deploy.morph148
1 files changed, 148 insertions, 0 deletions
diff --git a/clusters/mason-system-x86_64-openstack-deploy.morph b/clusters/mason-system-x86_64-openstack-deploy.morph
new file mode 100644
index 00000000..6bdb1cbb
--- /dev/null
+++ b/clusters/mason-system-x86_64-openstack-deploy.morph
@@ -0,0 +1,148 @@
+name: mason-system-x86_64-openstack-deploy
+kind: cluster
+description: |
+ An example cluster morphology demonstrating how to deploy a Mason
+ instance into an OpenStack Cloud.
+
+ Mason consists of a distbuild system and Zuul/turbo-hipster to run
+ tests. In the future, we should make it possible to deploy a Mason
+ instance which uses an existing distbuild network for builds,
+ rather than setting up its own.
+
+ The Mason configure extension takes a whole load of parameters:
+
+ * TROVE_ID: the same as for distbuild, this is the short ID of
+ your upstream Trove.
+ * TROVE_HOST: the same as for distbuild, this is the FQDN or
+ IP address of your upstream Trove.
+ * ARTIFACT_CACHE_SERVER: this is the FQDN or IP address of the
+ artifact cache you wish to use - normally the same as
+ TROVE_HOST.
+
+ * GERRIT_USER: the username of the Gerrit account Zuul should
+ use to look for and report on changes.
+ * GERRIT_HOSTNAME: the FQDN or IP address of the Gerrit instance
+ to be used.
+ * GERRIT_HTTP_PORT: the port used to access the HTTP frontend of
+ Gerrit - normally 8080.
+ * GERRIT_GIT_PORT: the port used to access Gerrit's git interface
+ (and via SSH) - normally 29418.
+ * GERRIT_SSH_KEY: the location of the SSH key to be added to the
+ system for use when accessing Gerrit. If this is not the same
+ WORKER_SSH_KEY then GERRIT_SSH_KEY_PATH should *not* be
+ "/root/.ssh/id_rsa"
+ * GERRIT_SSH_KEY_PATH: the location to put the SSH key for Gerrit
+ in the system. Normally, "/root/.ssh/id_rsa" is sufficient,
+ unless WORKER_SSH_KEY and GERRIT_SSH_KEY are not the same.
+
+ * GEARMAN_HOST: the FQDN or IP address of the Gearman server. If
+ START_GEARMAN is yes, then this should be 127.0.0.1
+ * GEARMAN_PORT: the port used for accessing the Gearman server.
+ This is normally 4730.
+ * START_GEARMAN: yes or no. If yes, then a Gearman server is run
+ on the Mason instance by Zuul.
+
+ * MASON_ARCHITECTURE: this is currently used to determine which
+ artifacts need to be uploaded. Artifacts from systems in
+ MASON_CLUSTER_MORPHOLOGY with arch: MASON_ARCHITECTURE are
+ uploaded.
+ * MASON_CLUSTER_MORPHOLOGY: this is the cluster morphology which
+ contains the systems to be tested.
+ * MASON_DISTBUILD_CONTROLLERS: this is a comma separated list of
+ pairs of the form "architecture:ip" which defines the distbuild
+ networks available for Mason. It is not used by the tests at
+ the moment however.
+ * MASON_TEST_HOSTS: this is a comma separated list of pairs of the
+ form "architecture:user@url" which defines the places to deploy
+ test systems to. If MASON_TEST_INFRASTRUCTURE_TYPE is "openstack"
+ then use your OpenStack auth URL.
+ * MASON_TEST_INFRASTRUCTURE_TYPE: this can be 'kvm' or 'openstack',
+ depending on if you are deploying your test instances to a kvm
+ host or an OpenStack cloud.
+ * MASON_UPSTREAM_TROVE: this is the Trove to which artifacts are
+ uploaded on success by Mason.
+
+The following are only required if MASON_TEST_INFRASTRUCTURE_TYPE is
+openstack:
+
+ * MASON_OPENSTACK_AUTH_URL: the auth url of the OpenStack instance
+ test systems are deployed to.
+ * MASON_OPENSTACK_NETWORK_ID: the network ID that test systems will
+ be connected to.
+ * MASON_OPENSTACK_USER: the username used by Mason to deploy test
+ systems with Glance.
+ * MASON_OPENSTACK_TENANT: the tenancy to deploy test systems in.
+ * MASON_OPENSTACK_TENANT_ID: the ID of the above tenancy. We
+ probably don't actually need this, but whilst we expect it to
+ be here you should use the real value. Using the wrong value
+ will cause Mason to fail to deploy test instances.
+ * MASON_OPENSTACK_PASSWORD: the password of the Mason user on
+ OpenStack. Note that this will be stored in plaintext on the
+ Mason instance. Perhaps pass this via the command line?
+
+It is possible to deploy a generic Mason which you can then boot
+and give configuration to at a later date:
+
+ MASON_GENERIC: yes
+
+To configure a generic Mason, add a YAML file containing all the required
+variables in the form at /etc/mason/mason.conf:
+
+ VARIABLE: value
+ VARIABLE: value
+ ... ...
+
+However, you will still need to provide ARTIFACT_CACHE_SERVER,
+TROVE_ID and TROVE_HOST as they are also used by distbuild.configure.
+
+
+systems:
+- morph: systems/mason-system-x86_64-generic.morph
+ deploy-defaults:
+ # The following are all needed for extensions other than mason.configure
+ ARTIFACT_CACHE_SERVER: cache.baserock.org
+ CONTROLLERHOST: mason-system-x86-64
+ DISTBUILD_CONTROLLER: true
+ DISTBUILD_WORKER: true
+ RAM_SIZE: 8G
+ DISK_SIZE: 4G
+ VCPUS: 2
+ TROVE_HOST: git.baserock.org
+ TROVE_ID: baserock
+ WORKERS: mason-system-x86-64
+ WORKER_SSH_KEY: ssh-keys/worker.key
+ HOSTNAME: mason-system-x86-64
+ CLOUD_INIT: yes
+ KERNEL_ARGS: console=ttyS0 console=tty0
+ INSTALL_FILES: distbuild/manifest
+ # It could be worthwhile setting these in your environment instead of here
+ OPENSTACK_AUTH_URL: auth-url
+ OPENSTACK_IMAGENAME: mason-system-x86_64
+ OPENSTACK_NETWORK_ID: network-id
+ OPENSTACK_USER: openstack-username
+ OPENSTACK_TENANT: openstack-tenant
+ OPENSTACK_TENANT_ID: tenant-id
+ deploy:
+ mason:
+ type: openstack
+ location: auth-url
+ MASON_OPENSTACK_AUTH_URL: auth-url
+ MASON_OPENSTACK_NETWORK_ID: network-id
+ MASON_OPENSTACK_USER: mason
+ MASON_OPENSTACK_TENANT: mason-tenant
+ MASON_OPENSTACK_TENANT_ID: mason-tenant-id
+ GERRIT_USER: mason
+ GERRIT_HOSTNAME: gerrit.example.com
+ GERRIT_HTTP_PORT: 8080
+ GERRIT_GIT_PORT: 29418
+ GERRIT_SSH_KEY: ssh-keys/worker.key
+ GERRIT_SSH_KEY_PATH: /root/.ssh/id_rsa
+ GEARMAN_HOST: 127.0.0.1
+ GEARMAN_PORT: 4730
+ START_GEARMAN: yes
+ MASON_CLUSTER_MORPHOLOGY: clusters/ci.morph
+ MASON_ARCHITECTURE: x86_64
+ MASON_TEST_HOSTS: "x86_64:user@auth-url"
+ MASON_DISTBUILD_CONTROLLERS: "x86_64:not-yet-used"
+ MASON_TEST_INFRASTRUCTURE_TYPE: openstack
+ MASON_UPSTREAM_TROVE: some-writeable-artifact-cache