Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jenkins-infra/azure

Documentation, tooling and other resources related to the Azure account used by the Jenkins project
https://github.com/jenkins-infra/azure

aks azure terraform

Last synced: about 12 hours ago
JSON representation

Documentation, tooling and other resources related to the Azure account used by the Jenkins project

Awesome Lists containing this project

README

        

= Jenkins infra on Azure
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
:toc:
:private_repo_name: terraform-states
:private_repo_url: https://github.com/jenkins-infra/{private_repo_name}

This repository hosts the infrastructure-as-code definition for all the link:https://azure.com/[Azure hosted] resources for the link:https://www.jenkins.io/projects/infrastructure/[Jenkins Infrastructure Project].

See also https://github.com/jenkins-infra/azure-net for all global network related resources.

== Requirements

In order to use this repository to provision the Jenkins infrastructure on azure, you need:

* An `Azure` account
* The requirements (of the shared tools) listed at link:https://github.com/jenkins-infra/shared-tools/tree/main/terraform#requirements[shared-tools/terraform#requirements]
* The link:https://developer.hashicorp.com/terraform/language/settings/backends/azurerm[Terraform AzureRM Backend Configuration] on a local file named `backend-config`:
** The content can be retrieved from the outputs of the link:{private_repo_url}[(private) repository {private_repo_name}]
** This file (`backend-config`) is git-ignored

* The git command line to allow cloning the repository and its submodule link:https://github.com/jenkins-infra/shared-tools[shared-tools]
** This repository has submodules. Once you cloned the repository, execute the following command to obtain the shared tools:

[source,bash]
----
git submodule update --init --recursive
----

== HowTo

=== Provision

IMPORTANT: Don't blindly execute the terraform code located in this repository on your own account as it may lead your account bill to significantly increase.

Once you've fulfilled the <>, you may execute any command from https://github.com/jenkins-infra/shared-tools/blob/main/terraform/README.adoc#available-commands by adding the correct flag `--directory` pointing to `.shared-tools/terraform/`:

[source,bash]
----
make --directory=.shared-tools/terraform help
make --directory=.shared-tools/terraform lint
# ...
----

A usual change to this repository looks like the following:

* Fork the repository and clone it locally
* Follow the <> steps to obtain the shared tools
* Start by running a full `make --directory=.shared-tools/terraform validate` command to ensure that you work on a sane base (should generate a report TXT file with no changes to be applied)
* Edit the Terraform project files
* Run the command `make --directory=.shared-tools/terraform validate` again to ensure that your changes are OK
* Commit, push and open a pull request to let the Jenkins pipeline run the test + plan (as per https://github.com/jenkins-infra/shared-tools/blob/main/terraform/README.adoc#jenkins-pipeline)