update how to add a new environment
This commit is contained in:
@@ -57,8 +57,8 @@ Current **GIT** server at **PSI** is ``git.psi.ch``. Every new environment shoul
|
||||
|
||||
You must belong to the ``puppet_env`` Active Directory group in order to be able to create new projects.
|
||||
|
||||
In order to create a new environment in **GIT**, you should access and login in the following link: https://git.psi.ch/linux-infra/. Here you can see
|
||||
the different environments and **GIT** projects belonging to the **linux-infra** group.
|
||||
In order to create a new environment in **GIT**, you should access and login in the following link: https://git.psi.ch/linux-infra/hiera/.
|
||||
Here you can see the different environments.
|
||||
|
||||
The steps to create and configure a new **GIT** project are:
|
||||
|
||||
@@ -66,7 +66,7 @@ The steps to create and configure a new **GIT** project are:
|
||||
|
||||
- Go to ``[Blank project] Tab`` (which is the *default* tab)
|
||||
- Change ``[Project Path]`` as follows:
|
||||
- https://git.psi.ch/ + ``linux-infra``
|
||||
- https://git.psi.ch/ + ``linux-infra/hiera``
|
||||
- Define ``[Project Name]``, which *must* have the following format:
|
||||
- ``data-<environment_name>`` where ``<environment_name>`` is the one defined in **Bob**
|
||||
- *[Optional]* Specify ``[Project description]``
|
||||
@@ -76,7 +76,7 @@ The steps to create and configure a new **GIT** project are:
|
||||
2. Configure *project* permissions as follows:
|
||||
|
||||
- ``[data-<environment_name]->[Settings]->[Repository]``, or directly: https://git.psi.ch/linux-infra/hiera/data-(environment_name)/-/settings/repository
|
||||
- ``[Deploy Keys]`` -> select ``root@puppet01.psi.ch'`` -> click on ``'Enable'``
|
||||
- ``[Deploy Keys]`` -> ``[Privately accessible deploy keys]`` -> select ``root@puppet01.psi.ch'`` -> click on ``'Enable'``
|
||||
- ``[data-<environment_name]->[Settings]->[Members]``, or directly: https://git.psi.ch/linux-infra/hiera/data-(environment_name)/project_members
|
||||
- Setup specific permissions for specific users or groups. In example:
|
||||
- Set project ``Master``:
|
||||
@@ -105,35 +105,15 @@ In example::
|
||||
X11 forwarding request failed
|
||||
warning: You appear to have cloned an empty repository.
|
||||
|
||||
Configuring the environment in Puppet
|
||||
-------------------------------------
|
||||
Configuring the environment in Puppet server
|
||||
--------------------------------------------
|
||||
|
||||
Current *test* **Puppet** server is ``puppet00-test.psi.ch``. Current *production* **Puppet** server is ``puppet01.psi.ch``. This documentation will take as an example an environment
|
||||
deployed in the *production* server ``puppet01.psi.ch``.
|
||||
In [bootstrap](https://git.psi.ch/linux-infra/bootstrap) add the new repo to `instcode/puppet/puppet_server/manifests/data.pp` and run the bootstrap for the Puppet server.
|
||||
|
||||
You must have ``root`` access to the Puppet server in order to be able to configure it.
|
||||
Configuring the environment in Sysdb Server
|
||||
-------------------------------------------
|
||||
|
||||
Steps are:
|
||||
|
||||
1. Login in to the Puppet server::
|
||||
|
||||
ssh root@puppet01.psi.ch
|
||||
|
||||
2. Clone the already created **GIT** project to the ``/srv/puppet/data`` path, which contains all the different projects (Bob environments)::
|
||||
|
||||
git clone git@git.psi.ch:linux-infra/data-<environment_name>.git /srv/puppet/data/<environment_name>
|
||||
|
||||
# In example:
|
||||
git clone git@git.psi.ch:linux-infra/data-meg.git /srv/puppet/data/meg
|
||||
|
||||
3. Change permissions to ``plidata.puppet`` for the new directory ``/srv/puppet/data/<environment_name>``::
|
||||
|
||||
chown -R plidata.puppet /srv/puppet/data/<environment_name>
|
||||
|
||||
# In example:
|
||||
chown -R plidata.puppet /srv/puppet/data/meg
|
||||
|
||||
At this point, everything should be configured and we can proceed to test that it works.
|
||||
In [bootstrap](https://git.psi.ch/linux-infra/bootstrap) add the new repo to the suitable inventory file (eg. `ansible/inventory.yaml` for production) and run the playbook for the Sysdb server.
|
||||
|
||||
Test new environment in Puppet
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Reference in New Issue
Block a user