From 8a8f6095586c6c6d49df09e09f513b2408714282 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 3 Oct 2012 13:30:23 +0200 Subject: Add documentation for OpenNebula datasource. --- doc/sources/opennebula/README | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 doc/sources/opennebula/README (limited to 'doc') diff --git a/doc/sources/opennebula/README b/doc/sources/opennebula/README new file mode 100644 index 00000000..97d8fb8b --- /dev/null +++ b/doc/sources/opennebula/README @@ -0,0 +1,66 @@ +The 'OpenNebula' DataSource supports the OpenNebula contextualization disk. + +The following criteria are required to be identified by +DataSourceOpenNebula as contextualization disk: + * must be formatted with iso9660 filesystem or labeled as CDROM + * must be un-partitioned block device (/dev/vdb, not /dev/vdb1) + * must contain + * context.sh + +== Content of config-drive == + * context.sh + This is the only mandatory file on context disk, the rest depends + on contextualization parameter FILES and thus are optional. It's + a shell script defining all context parameters. This script is + processed by bash (/bin/bash) to simulate behaviour of common + OpenNebula context scripts. Processed variables are handed over + back to cloud-init for further processing. + +== Configuration == +Cloud-init's behaviour can be modified by context variables found +in the context.sh file in the folowing ways: + * dsmode: + values: local, net, disabled + default: None + + Tells if this datasource will be processed in local (pre-networking) or + net (post-networking) stage or even completely disabled. + + * ssh_key: + default: None + If present, these key(s) will be used as the public key(s) for + the instance. More keys can be specified in this single context + variable, but each key must be on it's own line. I.e. keys must + be separated by newlines. + + * hostname: + default: None + Custom hostname for the instance. + + * public_ip: + default: None + If hostname not specified, public_ip is used to resolve hostname. + + * 'user_data' or 'userdata': + default: None + This provides cloud-init user-data. See other documentation for what + all can be present here. + +== Example OpenNebula's Virtual Machine template == + +CONTEXT=[ + PUBLIC_IP="$NIC[IP]", + SSH_KEY="$USER[SSH_KEY] +$USER[SSH_KEY1] +$USER[SSH_KEY2] ", + USER_DATA="#cloud-config +# see https://help.ubuntu.com/community/CloudInit + +packages: [] + +mounts: +- [vdc,none,swap,sw,0,0] +runcmd: +- echo 'Instance has been configured by cloud-init.' | wall + +" ] -- cgit v1.2.3 From a9939fe768e04d52fe530c7467357d79b78a21f4 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 3 Oct 2012 13:47:24 +0200 Subject: Minor OpenNebula's documentation tuning. --- doc/sources/opennebula/README | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/sources/opennebula/README b/doc/sources/opennebula/README index 97d8fb8b..772a5b99 100644 --- a/doc/sources/opennebula/README +++ b/doc/sources/opennebula/README @@ -9,8 +9,8 @@ DataSourceOpenNebula as contextualization disk: == Content of config-drive == * context.sh - This is the only mandatory file on context disk, the rest depends - on contextualization parameter FILES and thus are optional. It's + This is the only mandatory file on context disk, the rest content depends + on contextualization parameter FILES and thus is optional. It's a shell script defining all context parameters. This script is processed by bash (/bin/bash) to simulate behaviour of common OpenNebula context scripts. Processed variables are handed over @@ -18,7 +18,8 @@ DataSourceOpenNebula as contextualization disk: == Configuration == Cloud-init's behaviour can be modified by context variables found -in the context.sh file in the folowing ways: +in the context.sh file in the folowing ways (variable names are +case-insensitive): * dsmode: values: local, net, disabled default: None @@ -39,7 +40,7 @@ in the context.sh file in the folowing ways: * public_ip: default: None - If hostname not specified, public_ip is used to resolve hostname. + If hostname not specified, public_ip is used to DNS resolve hostname. * 'user_data' or 'userdata': default: None @@ -62,5 +63,4 @@ mounts: - [vdc,none,swap,sw,0,0] runcmd: - echo 'Instance has been configured by cloud-init.' | wall - " ] -- cgit v1.2.3 From b6db3ad471dca682f31658ebd2907feb376bc79f Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 20 Feb 2013 13:23:14 +0100 Subject: OpenNebula datasource documentation update. --- doc/sources/opennebula/README | 66 --------------------- doc/sources/opennebula/README.rst | 117 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 66 deletions(-) delete mode 100644 doc/sources/opennebula/README create mode 100644 doc/sources/opennebula/README.rst (limited to 'doc') diff --git a/doc/sources/opennebula/README b/doc/sources/opennebula/README deleted file mode 100644 index 772a5b99..00000000 --- a/doc/sources/opennebula/README +++ /dev/null @@ -1,66 +0,0 @@ -The 'OpenNebula' DataSource supports the OpenNebula contextualization disk. - -The following criteria are required to be identified by -DataSourceOpenNebula as contextualization disk: - * must be formatted with iso9660 filesystem or labeled as CDROM - * must be un-partitioned block device (/dev/vdb, not /dev/vdb1) - * must contain - * context.sh - -== Content of config-drive == - * context.sh - This is the only mandatory file on context disk, the rest content depends - on contextualization parameter FILES and thus is optional. It's - a shell script defining all context parameters. This script is - processed by bash (/bin/bash) to simulate behaviour of common - OpenNebula context scripts. Processed variables are handed over - back to cloud-init for further processing. - -== Configuration == -Cloud-init's behaviour can be modified by context variables found -in the context.sh file in the folowing ways (variable names are -case-insensitive): - * dsmode: - values: local, net, disabled - default: None - - Tells if this datasource will be processed in local (pre-networking) or - net (post-networking) stage or even completely disabled. - - * ssh_key: - default: None - If present, these key(s) will be used as the public key(s) for - the instance. More keys can be specified in this single context - variable, but each key must be on it's own line. I.e. keys must - be separated by newlines. - - * hostname: - default: None - Custom hostname for the instance. - - * public_ip: - default: None - If hostname not specified, public_ip is used to DNS resolve hostname. - - * 'user_data' or 'userdata': - default: None - This provides cloud-init user-data. See other documentation for what - all can be present here. - -== Example OpenNebula's Virtual Machine template == - -CONTEXT=[ - PUBLIC_IP="$NIC[IP]", - SSH_KEY="$USER[SSH_KEY] -$USER[SSH_KEY1] -$USER[SSH_KEY2] ", - USER_DATA="#cloud-config -# see https://help.ubuntu.com/community/CloudInit - -packages: [] - -mounts: -- [vdc,none,swap,sw,0,0] -runcmd: -- echo 'Instance has been configured by cloud-init.' | wall -" ] diff --git a/doc/sources/opennebula/README.rst b/doc/sources/opennebula/README.rst new file mode 100644 index 00000000..d4c3dc39 --- /dev/null +++ b/doc/sources/opennebula/README.rst @@ -0,0 +1,117 @@ +The `OpenNebula`_ DataSource supports the OpenNebula contextualization disk. + + See `contextualization overview`_, `contextualizing VMs`_ and + `network configuration`_ in the public documentation for + more information. + +OpenNebula's virtual machines are contextualized (parametrized) by +CD-ROM image data, which contains a shell script *context.sh* with +custom variables defined on virtual machine start. There are no +fixed contextualization variables, but the datasource accepts +many used and recommended across OpenNebula's documentation. + +Datasource configuration +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Datasource accepts following configuration options. + +:: + + dsmode: + values: local, net, disabled + default: net + +Tells if this datasource will be processed in 'local' (pre-networking) or +'net' (post-networking) stage or even completely 'disabled'. + +Contextualization disk +~~~~~~~~~~~~~~~~~~~~~~ + +The following criteria are required: + +1. Must be formatted with `iso9660`_ fs. or have fs. label of **CDROM** +2. Must contain file *context.sh* with contextualization variables. + File is generated by OpenNebula, it has a KEY="VALUE" format and + can be easily read by shell script. + +Contextualization variables +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are no fixed contextualization variables in OpenNebula, no standard. +Following variables were found on various places and revisions of +the OpenNebula documentation. Where multiple similar variables are +specified, only first found is taken. + +:: + + DSMODE + +Datasource mode configuration override. Values: local, net, disabled. + +:: + + DNS + ETH_IP + ETH_NETWORK + ETH_MASK + ETH_GATEWAY + ETH_DOMAIN + ETH_DNS + +Static `network configuration`_. + +:: + + HOSTNAME + +Instance hostname. + +:: + + PUBLIC_IP + IP_PUBLIC + ETH0_IP + +If no hostname has been specified, cloud-init will try to create hostname +from instance's IP address in 'local' dsmode. In 'net' dsmode, cloud-init +try to resolve one of its IP addresses to get hostname. + +:: + + SSH_KEY + SSH_PUBLIC_KEY + +One or multiple SSH keys (separated by newlines) can be specified. + +:: + + USER_DATA + USERDATA + +cloud-init user data. + + +Example OpenNebula's Virtual Machine template +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +CONTEXT=[ + PUBLIC_IP="$NIC[IP]", + SSH_KEY="$USER[SSH_KEY] +$USER[SSH_KEY1] +$USER[SSH_KEY2] ", + USER_DATA="#cloud-config +# see https://help.ubuntu.com/community/CloudInit + +packages: [] + +mounts: +- [vdc,none,swap,sw,0,0] +runcmd: +- echo 'Instance has been configured by cloud-init.' | wall +" ] + +.. _OpenNebula: http://opennebula.org/ +.. _contextualization overview: http://opennebula.org/documentation:documentation:context_overview +.. _contextualizing VMs: http://opennebula.org/documentation:documentation:cong +.. _network configuration: http://opennebula.org/documentation:documentation:cong#network_configuration +.. _iso9660: https://en.wikipedia.org/wiki/ISO_9660 -- cgit v1.2.3 From 0ae1b7588e906afc4f6e4be5ae4e4473e3477e1e Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 20 Feb 2013 13:24:37 +0100 Subject: Add OpenNebula DS on list of datasources. --- doc/rtd/topics/datasources.rst | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/rtd/topics/datasources.rst b/doc/rtd/topics/datasources.rst index 59c58805..5543ed34 100644 --- a/doc/rtd/topics/datasources.rst +++ b/doc/rtd/topics/datasources.rst @@ -140,6 +140,12 @@ Config Drive .. include:: ../../sources/configdrive/README.rst +--------------------------- +OpenNebula +--------------------------- + +.. include:: ../../sources/opennebula/README.rst + --------------------------- Alt cloud --------------------------- -- cgit v1.2.3 From 444120e896dffd1d7d788da5bfaa98ef762fba35 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Wed, 20 Feb 2013 13:46:18 +0100 Subject: OpenNebula documentation tuning. --- doc/sources/opennebula/README.rst | 46 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'doc') diff --git a/doc/sources/opennebula/README.rst b/doc/sources/opennebula/README.rst index d4c3dc39..5cbc4366 100644 --- a/doc/sources/opennebula/README.rst +++ b/doc/sources/opennebula/README.rst @@ -1,14 +1,14 @@ -The `OpenNebula`_ DataSource supports the OpenNebula contextualization disk. +The `OpenNebula`_ (ON) datasource supports the contextualization disk. See `contextualization overview`_, `contextualizing VMs`_ and `network configuration`_ in the public documentation for more information. OpenNebula's virtual machines are contextualized (parametrized) by -CD-ROM image data, which contains a shell script *context.sh* with +CD-ROM image, which contains a shell script *context.sh* with custom variables defined on virtual machine start. There are no fixed contextualization variables, but the datasource accepts -many used and recommended across OpenNebula's documentation. +many used and recommended across the documentation. Datasource configuration ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -32,7 +32,7 @@ The following criteria are required: 1. Must be formatted with `iso9660`_ fs. or have fs. label of **CDROM** 2. Must contain file *context.sh* with contextualization variables. File is generated by OpenNebula, it has a KEY="VALUE" format and - can be easily read by shell script. + can be easily read (via *source*) by shell Contextualization variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -74,7 +74,7 @@ Instance hostname. If no hostname has been specified, cloud-init will try to create hostname from instance's IP address in 'local' dsmode. In 'net' dsmode, cloud-init -try to resolve one of its IP addresses to get hostname. +tries to resolve one of its IP addresses to get hostname. :: @@ -91,24 +91,26 @@ One or multiple SSH keys (separated by newlines) can be specified. cloud-init user data. -Example OpenNebula's Virtual Machine template -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Example VM's context section +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -CONTEXT=[ - PUBLIC_IP="$NIC[IP]", - SSH_KEY="$USER[SSH_KEY] -$USER[SSH_KEY1] -$USER[SSH_KEY2] ", - USER_DATA="#cloud-config -# see https://help.ubuntu.com/community/CloudInit - -packages: [] - -mounts: -- [vdc,none,swap,sw,0,0] -runcmd: -- echo 'Instance has been configured by cloud-init.' | wall -" ] +:: + + CONTEXT=[ + PUBLIC_IP="$NIC[IP]", + SSH_KEY="$USER[SSH_KEY] + $USER[SSH_KEY1] + $USER[SSH_KEY2] ", + USER_DATA="#cloud-config + # see https://help.ubuntu.com/community/CloudInit + + packages: [] + + mounts: + - [vdc,none,swap,sw,0,0] + runcmd: + - echo 'Instance has been configured by cloud-init.' | wall + " ] .. _OpenNebula: http://opennebula.org/ .. _contextualization overview: http://opennebula.org/documentation:documentation:context_overview -- cgit v1.2.3 From 4c78588baa7ab2d17582b3888fdeb136c3aa73d0 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Thu, 21 Feb 2013 14:45:09 +0100 Subject: Example cloud.cfg --- doc/sources/opennebula/README.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc') diff --git a/doc/sources/opennebula/README.rst b/doc/sources/opennebula/README.rst index 5cbc4366..a84aebd4 100644 --- a/doc/sources/opennebula/README.rst +++ b/doc/sources/opennebula/README.rst @@ -90,6 +90,19 @@ One or multiple SSH keys (separated by newlines) can be specified. cloud-init user data. +Example configuration +~~~~~~~~~~~~~~~~~~~~~ + +This example cloud-init configuration (*cloud.cfg*) enables +OpenNebula datasource only in 'net' mode. + +:: + + disable_ec2_metadata: True + datasource_list: ['OpenNebula'] + datasource: + OpenNebula: + dsmode: net Example VM's context section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 6e156e4877e420050307249345287cf48ff5d795 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Tue, 10 Sep 2013 15:57:18 +0200 Subject: Update OpenNebula documentation (parseuser, more fs. labels, K-V single quotes) --- doc/sources/opennebula/README.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/sources/opennebula/README.rst b/doc/sources/opennebula/README.rst index a84aebd4..4d7de27a 100644 --- a/doc/sources/opennebula/README.rst +++ b/doc/sources/opennebula/README.rst @@ -24,15 +24,24 @@ Datasource accepts following configuration options. Tells if this datasource will be processed in 'local' (pre-networking) or 'net' (post-networking) stage or even completely 'disabled'. +:: + + parseuser: + default: nobody + +Unprivileged system user used for contextualization script +processing. + Contextualization disk ~~~~~~~~~~~~~~~~~~~~~~ The following criteria are required: -1. Must be formatted with `iso9660`_ fs. or have fs. label of **CDROM** +1. Must be formatted with `iso9660`_ filesystem + or have a *filesystem* label of **CONTEXT** or **CDROM** 2. Must contain file *context.sh* with contextualization variables. - File is generated by OpenNebula, it has a KEY="VALUE" format and - can be easily read (via *source*) by shell + File is generated by OpenNebula, it has a KEY='VALUE' format and + can be easily read by bash Contextualization variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -103,6 +112,7 @@ OpenNebula datasource only in 'net' mode. datasource: OpenNebula: dsmode: net + parseuser: nobody Example VM's context section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3