Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 1.99 KB

README.md

File metadata and controls

58 lines (35 loc) · 1.99 KB

Jenkins provisioning

🚧 Work in progress

Install and configure Jenkins in an automated way using the Hetzner cloud provider.

You need to set an environment variable called HCLOUD_TOKEN in order to create all remote resources. To generate it, go to your project security tab and click on Generate API Token button.

Build

Check project files

Tools you need

To execute this scripts you will need to have installed in your computer:

How to

💰 Keep in mind that you may be charged by the cloud provider if you use this repository.

First you need to have all requirements installed on your local machine. Execute this directive:

$ make install-requirements

This will install all required roles and collections needed to provision the base images.

Now you can execute the required directive to generate the base image with the common components to run a Jenkins instance.

$ make packer-build

The last step is to provision the resources using terraform. Just execute this command:

$ make terraform-apply TERRAFORM_SSH_KEYS='["your_sshkey"]'

Use your own SSH key name from the Hetznet dashboard.

Local development

You will need Docker installed. To test all scripts in a local environment before deploy the final version you will need to execute the next directive. Note that you can customize some values, like the default Jenkins user and password:

$ make local-jenkins-start JENKINS_AUTH_USER=test JENKINS_AUTH_PASSWORD=password

If you do not specify any user or password the default ones are jenkins and password.