Skip to content

Commit

Permalink
group updates to public branch
Browse files Browse the repository at this point in the history
  • Loading branch information
lj020326 committed Mar 25, 2024
1 parent a481b5a commit 6da5a44
Show file tree
Hide file tree
Showing 2,812 changed files with 18,879 additions and 213,155 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
*/packer_cache/*
packer_cache/*
!packer_cache/.gitkeep

.govmomi
templates/manifest.json

iso/*
*.iso
*/output-virtualbox-iso/*
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "ansible"]
path = ansible
url = git@github.com:lj020326/ansible-datacenter.git
branch = public
[submodule "ansible-github"]
path = ansible
url = https://github.com/lj020326/ansible-datacenter.git
branch = main
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,49 @@ You can also fork this repository and customize a build configuration with your
The following software must be installed/present on your local machine before you can use Packer to build any of these Vagrant boxes:

- [Packer](http://www.packer.io/)
- [Vagrant](http://vagrantup.com/)
- [VirtualBox](https://www.virtualbox.org/)
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)

I use docker containers for my jenkins build agents which have ansible and packer already installed.
The [specification for the docker agent container image can be found here](https://github.com/lj020326/jenkins-docker-agent/blob/master/image/jenkins-cicd-agent/Dockerfile).
The container leverages the 'jenkins/inbound-agent' image and the [cicd-build-tool image defined here](https://github.com/lj020326/jenkins-docker-agent/blob/master/image/cicd-build-tools/Dockerfile).

## Jenkins Pipeline Usage

### Setup pipeline automation library used by all jenkins jobs
The pipeline automation library used can be found [here](https://github.com/lj020326/pipeline-automation-lib).
[The pipeline automation library](https://github.com/lj020326/pipeline-automation-lib) defines the shared jenkins templates that are used throughout all of the jenkins ansible pipelines.

Configure the library in jenkins as seen below.
![Jenkins - Configure shared Pipeline Automation Library](./docs/screenshots/packer-templates-00-pipeline-library.png)


### Site Root folder

A root folder for the packer-templates environment can be setup similar to the following.
![Site Root](./docs/screenshots/packer-templates-0-toplevel.png)

### VM Packer Template OS folders

Then setup folders for each VM OS defined as follows.
![Site Environments](./docs/screenshots/packer-templates-1a-os.png)


### VM Packer Template OS Version folders

Then setup folders for each VM OS Version defined as follows.
![Site Environments](./docs/screenshots/packer-templates-1a-os-versions.png)
![Site Environments](./docs/screenshots/packer-templates-1a-os-version-builds.png)

### VM Packer Template builder pipeline folders

For each template build node at the leaf level, setup a jenkins folder to run the groovy pipeline wrapper used to start the packer VM template builder process.

The folder definition for each VM template build folder should be as follows.
![Site Environments](./docs/screenshots/packer-templates-1a-template-build-wrapper.png)

See the job console for the VM packer template build pipeline output.
![Job Console Output](./docs/screenshots/packer-templates-1a-template-build-output.png)

The detailed [pipeline job console output](./docs/jenkins-consoleText-packer-build-ubuntu-log.md).

If defining the ansible playbooks as a submodule the same way done in this repo, make sure that the git repo option to "Recursively update submodules" is set/checked.
1 change: 1 addition & 0 deletions ansible
Submodule ansible added at 5f02af
23 changes: 0 additions & 23 deletions ansible/.gitignore

This file was deleted.

Loading

0 comments on commit 6da5a44

Please sign in to comment.