[UG][IaC] Added sections about Git repo

Added sections about the Git repo structure for IaC LCM and
instructions on how to configure a Git repository.

Change-Id: I9cd169a6b563ef860b0d7841c4dbfd0193b5e565
This commit is contained in:
Svetlana Karslioglu 2016-11-25 07:54:51 -08:00
parent aac5cb4aad
commit dce6597f39
2 changed files with 143 additions and 2 deletions

View File

@ -3,4 +3,100 @@
Git repository structure
------------------------
TBA
You can have the following configuration priorities in the Git repository:
* **Cluster** - configuration is applied to all nodes. All cluster level
configuration files must be placed in the root directory in the Git
repository.
* **Role** - configuration is applied to all nodes with the selected role.
Parameters with the Role level override parameters with the Cluster level.
* **Node** - configuration is applied to the selected node ID. Parameters
with the Node level override the parameters with Global and Role levels.
The following text is an example of a Git repository that you can create:
::
.
|-- cluster.yaml
|`-- glance-api.conf
|-- nodes
|`-- node_1.domain.local.yaml
|-- roles
|`-- compute.yaml
|`-- controller.yaml
|`-- primaray-controller.yaml
The example above illustrates what types of files can be
stored in the repository. However, you can modify this structure as needed.
The configuration files you create must use Puppet's resource types
to describe the required configuration. For more information about the
parameters and attributes that you can specify in the configuration files, see
*Puppet Resource Type Reference*.
The following table describes the Git repository structure.
.. list-table:: **Git repository structure**
:widths: 20 10 15
:header-rows: 1
* - File
- Description
- Example
* - ``cluster.yaml``
- Describes cluster-level configurations in a form of a dictionary.
-
::
configuration:
nova_config:
'DEFAULT/nova_test':
value: cluster_param
'DEFAULT/another_param':
value: another_param_value
* - ``nodes/<node-name>.yaml``
**Example:** ``node_1.domain.local.yaml``
- Describes node priority configurations.
-
::
configuration:
nova_config:
'DEFAULT/debug':
value: True
'DEFAULT/nova_cluster_override':
value: node_param
package:
'mc':
ensure: absent
exec:
'some_test':
command: '/bin/touch /tmp/test'
unless: '/bin/test -f /tmp/test'
path: '/bin:/sbin'
* - ``roles/<node-role>.yaml``
**Example:** ``roles/primary-controller``
- Describes configuration for all related node roles.
To view the list of node roles in this environment, run the
:command:`fuel node` command.
-
::
configuration:
nova_config:
'DEFAULT/nova_test':
value: controller_param
.. seealso::
- `Puppet Resource Type Reference
<https://docs.puppet.com/puppet/latest/reference/type.html>`_
- `Fuel CLI Reference
<http://docs.openstack.org/developer/fuel-docs/userdocs/fuel-user-guide/cli/cli_config_openstack.html>`_

View File

@ -3,4 +3,49 @@
Set up a Git repository
=======================
TBA
You need to create a Git repository to store and modify the required
configuration files, as well as configure the repository to work with
the Fuel Nailgun configuration service.
.. note::
Fuel can work with multiple Git repositories.
However, limit one repository and one branch per an OpenStack environment.
**To set up a Git repository:**
#. Create a Git repository in any Git repository management system
or web-based service, such as GitHub.
#. Add the public SSH key located in ``.ssh/id_rsa.pub`` to your
Git repository.
#. Create a repository object within Nailgun and register the
repository with Nailgun:
::
fuel2 gitrepo create <ENV_ID> --name <NAME_OF_NAILGUN_OBJECT> \
--url <URL_TO_REPO> --ref <BRANCH_TO_GRAB_CONFIG_FROM> --key \
<PATH_TO_SSH_KEY>
**Example:**
::
fuel2 gitrepo create --env 1 --name oscnf1 --url \
git@github.com:dukov/oscnf.git --ref master --key .ssh/id_rsa
#. Create a repository structure similar to the one described in
:ref:`repo-structure` by adding the required
files in the repository and committing the changes.
#. Optionally, configure the Git repository to track changes in your
OpenStack environment in a separate branch:
::
fuel2 gitrepo get configs --env <ENV_ID>
You must have write permissions to the Git repository.