Commit Graph

102 Commits

Author SHA1 Message Date
Marc Mattmüller 29e807db1b playbook,docker: added playbook to build a docker image
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 13:00:44 +02:00
Marc Mattmüller 35e28eb1a3 playbooks/clone-repo: added condition when repo is already cloned
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 12:37:48 +02:00
Marc Mattmüller 1960187318 doc/researchAnsible: added section to clone a git repository
AWX uses separate ssh keys to access the host. The host itself uses
its own ssh keys to access bitbucket. The added section shows a way
how to handle such a condition.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 11:52:58 +02:00
Marc Mattmüller 262c560f38 doc/researchAnsible: added snippet reconfiguring docker network
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 11:51:22 +02:00
Marc Mattmüller 8b56069a38 playbooks/clone-repo: refactored the playbook
removed the logs to increase the security

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 11:30:00 +02:00
Marc Mattmüller 15732a2cf7 playbooks/clone-repo: fixed repo url (forgotten during refactoring)
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 11:14:09 +02:00
Marc Mattmüller 14b51efb5d playbooks/clone-repo: 1 task for cloning, checking out and updating
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 10:58:33 +02:00
Marc Mattmüller 0b66f54f97 playbooks/clone-repo: changed creating auto ssh add file and its path
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 10:50:47 +02:00
Marc Mattmüller fcceaca96e playbooks/clone-repo: make auto ssh add file executable
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 10:43:05 +02:00
Marc Mattmüller 2438809884 playbooks/clone-repo: using shell commands to clone repo
by using shell commands we have more flexibility to clone the repo
using specific ssh keys.
Additionally we provide the passphrase for the ssh key using the
AXW vault.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 10:33:20 +02:00
Marc Mattmüller 4d9f64f3dc playbooks/clone-repo: replaces ip with name of bitbucket
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-13 08:06:49 +02:00
Marc Mattmüller 9920d1d9b4 inventory: switching the host to a server in the HAC network
The created server for the conceptional work of the CoreOS CI is
currently available but not much used. Thus, I switched the host
of the inventory to this server. With it it should be possible to
clone a repository, build and launch a docker image.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-12 17:52:19 +02:00
Marc Mattmüller 3216c8d0f6 inventory,playbook/conf-docker-net: changed the VM ip and used sudo
the IP of my VM is adapted due to my smartphone acting as gateway
and DHCP server. Thus I made the work easier and change the IP in
the inventory.
For the docker network reconfiguration I used sudo so that we can
use the priviledged mode

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-12 12:00:23 +02:00
Marc Mattmüller 3027f8e284 playbooks: added configure docker network playbook first version
per default docker uses IP 172.17.0.0/16 which conflicts with the
test network at NetModule. Hence, we reconfigure it to
192.168.5.1/24

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-06 16:27:21 +02:00
Marc Mattmüller ef3fd030ba doc/ciWithinBitbucket: added link to keep in mind
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-06 14:29:16 +02:00
Marc Mattmüller 4a7633f845 doc/researchAnsible: added section for creating ssh keypairs
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-06 14:28:39 +02:00
Marc Mattmüller f691f5206c playbooks;inventory: added variable to production.yaml and added create-ssh-key playbook
The production inventory got a new variable called host_name which we use in the
newly added playbook creating an SSH key.
The playbook holds the no_log tag for keeping the execution parts more secure.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-06 13:48:22 +02:00
Marc Mattmüller 70d033bde7 doc: added the installed Jenkins plugins on the NWL instance
additionally, I added the ones which are installed on the
NetModule Jenkins instance.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-05 13:23:50 +02:00
Marc Mattmüller c304cf9954 doc: added new chapter with title CI within Bitbucket
the topic about using the Git server (Bitbucket or GitLab) for
user-space applications has driven me into that direction.
Unfortunately there is a lack of information and permission to
move on with this topic. Thus, I postponed it until I get some
news :-)

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-06-05 13:18:49 +02:00
Marc Mattmüller a9a720a364 doc: added CI use-cases
visualized the different use-cases for the CI environment
including the TDD workflow.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-30 16:53:20 +02:00
Marc Mattmüller 565493b9de playbook/clone-repo: replaced bitbucket name with ip
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-22 16:09:42 +02:00
Marc Mattmüller 8837554aba playbooks/clone-repo: removed prompting but added std output
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-22 11:06:50 +02:00
Marc Mattmüller bce9b6c45f playbooks/clone-repo: fixed indentation
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-22 10:59:28 +02:00
Marc Mattmüller 470a77f787 playbooks/clone-repo: added missing syntax element for prompting
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-22 10:53:34 +02:00
Marc Mattmüller 850396ebc3 playbooks: added playbook to clone a repository
the repository url shall be prompted to keep it more flexible.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-22 10:38:11 +02:00
Marc Mattmüller ae29034593 doc/researchAnsible: added part about basic pkg installation with sudo
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-16 14:22:12 +02:00
Marc Mattmüller c37bd6f380 playbooks,inventory: added playbook installing basic tools on a VM
As soon as a virtual machine is ready, we install docker as it gives
the most flexbility for our CI and the docker images are versionized.
Hence, we install docker as main installation package.
We assume that the VM holds the following users:
- root
- superuser (added to sudoers)
- user

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-15 18:18:19 +02:00
Marc Mattmüller 9e6a6d7c8d doc/researchAnsible: added job template for getting started playbook
Documented the job template to get the information residing in
the playbook getting_started/os-rls.yml

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-15 09:56:19 +02:00
Marc Mattmüller c22a7a2f38 doc/researchAnsible: added sections for project and inventories
this commit holds the information about how to synchronize a git
project containing ansible playbooks and hosts with AWX.

NOTE: getting the hosts of the inventroy file is not that obvious,
      hence it is worth to read it.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-15 09:56:13 +02:00
Marc Mattmüller 6a824507ed ansible.cfg,os-rls.yml: added configuration for files and fixed var
fixed variable in playbook os-rls.yml and added config file for
the ansible file paths.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-09 15:19:43 +02:00
Marc Mattmüller ea59c88fe0 inventory/production: add data type ending
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-09 13:30:31 +02:00
Marc Mattmüller 616c35f9b1 inventroy/production: reformatted the content
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-09 13:26:40 +02:00
Marc Mattmüller 777d708883 inventory: removed subdirectory and renamed ci to production
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-09 13:22:00 +02:00
Marc Mattmüller cc1c338e09 researchAnsible: updated with setup of latest AWX version
The latest version of AWX requires a Kubernetes Cluster. This
commit holds the update of the page and shows both installation
methodes (directly with docker and the latest version with a
minikube).

Additionally, I added a new section setting up a virtual machine
for test purpose. With it another section for accessing such
machines over SSH.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-09 12:25:16 +02:00
Marc Mattmüller 118b75408d inventroy,playbooks: arranged files in subdirectories
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-09 12:02:29 +02:00
Marc Mattmüller 8b9d480e26 inventory: added IP address of newly created VM
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-08 17:14:21 +02:00
Marc Mattmüller add58c392f inventory: renamed inventory
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-02 13:25:52 +02:00
Marc Mattmüller 3dfabb5b3d playbooks,collections: renamed to .yml and added collection requirements
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-02 13:14:31 +02:00
Marc Mattmüller 740a647460 doc,ansible: documented setup of AWX, added structure for a first playbook
Documented the setup of an AWX instance using docker-compose.
Added a first playbook including inventory

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-02 12:40:20 +02:00
Marc Mattmüller d4f00bf431 doc/nwl-ci: added parts about CI adaptions
the nightly timer triggers the job without target parameter. Thus,
the job checks if it is a nightly build and takes a default target
which is the clearfog one.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-01 12:04:54 +02:00
Marc Mattmüller a41f1b1148 jobs/build: use default target when job is triggered by timer
In a nightly build the job parameter TARGET stays on "selected...".
Thus, a check verifies if the job is triggered by a timer and then
takes the default target which is the first one in the file
'nwlTargets'.
With it the description name of the build gets a postfix 'nightly'.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-05-01 09:11:19 +02:00
Marc Mattmüller 27c7777f79 jobs/common: removed settings for sstate- and equiv server
currently the environment is unclear and is set to ToDo

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-25 16:12:31 +02:00
Marc Mattmüller dd0c8c871c doc: updated changes due to permission restriction
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-25 15:15:04 +02:00
Marc Mattmüller 3e52ea97ed jobs/common: set nwl image for CI
with the current Merge Request there are now 2 images for the NWL.
One is specially for the CI.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-25 14:35:11 +02:00
Marc Mattmüller 0e39db0e35 README,doc: added next-level-CI and NWL-CI documentation
adapted README accordingly to build the documentation.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-18 16:05:34 +02:00
Marc Mattmüller 34eae1d78d README: adapted readme with a bit more details
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-18 10:09:58 +02:00
Marc Mattmüller c3056f4cb5 jobs/common: removed residing parallel configuration for auto.conf
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-18 09:14:23 +02:00
Marc Mattmüller ca4b22b136 jobs/build: added missing removing of pre clone directory
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-18 09:13:47 +02:00
Marc Mattmüller eb19873605 jobs: adding git credentials and finalized pre-node step
need to clone the repository to load the list of the buid
targets in pre-node step.

added a git credential ID getter to clone repositories.

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-18 08:47:12 +02:00
Marc Mattmüller 4251812565 jobs/Build: fixed apostrophes when setting the job description
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
2023-04-18 08:18:25 +02:00