diff --git a/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/repo-structure.rst b/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/repo-structure.rst index 2c2b76853..408b2fdad 100644 --- a/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/repo-structure.rst +++ b/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/repo-structure.rst @@ -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/.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/.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 + `_ + - `Fuel CLI Reference + `_ diff --git a/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/set-up-git-repo.rst b/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/set-up-git-repo.rst index f206d4268..f32f0b536 100644 --- a/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/set-up-git-repo.rst +++ b/userdocs/fuel-user-guide/post-deployment-conf/lcm-git-repo/set-up-git-repo.rst @@ -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 --name \ + --url --ref --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 + + You must have write permissions to the Git repository. +