https://github.com/jefeish/jenkins-terraform
Repo to create a Jenkins AWS instance (no docker)
https://github.com/jefeish/jenkins-terraform
Last synced: 2 months ago
JSON representation
Repo to create a Jenkins AWS instance (no docker)
- Host: GitHub
- URL: https://github.com/jefeish/jenkins-terraform
- Owner: jefeish
- License: mit
- Created: 2021-05-10T00:12:40.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-13T19:32:19.000Z (about 4 years ago)
- Last Synced: 2025-02-01T16:27:38.977Z (4 months ago)
- Language: Shell
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkins-terraform
Repo to create a Jenkins AWS instance (no docker)
## Deploy
### Init
Prepare the required resource (create the `.terraform` folder)
```bash
terraform init
```---
### Validate
Check if the `terraform plan` is valid
```bash
terraform validate
```> Note: `plan` also does a `validate`, so you might skip this step.
---### Plan
Prepare / review what resources the `terraform plan` would apply
```bash
terraform plan
```---
### Apply
Apply the `terraform plan`, create the resources
```bash
terraform apply
```## Secure Jenkins
This is still a semi manual process. Terraform installs all required tools but the actual installation is described in the `Secure Nginx Connection` section :point_down: (see *References*).
---
## References
### Secure Nginx Connection
- [How to Secure Nginx with Let's Encrypt](https://phoenixnap.com/kb/letsencrypt-nginx) - This uses a Nginx plugin to automatically update the Nginx virtual host configuration.
:warning: Make sure to set the right Nginx `proxy` settings *(this needs to be modified from the Nginx plugin genereated config)*
```bash
proxy_redirect http://localhost:8080 https://.com;
proxy_pass http://localhost:8080;
```> replace ``
- [How to Configure Jenkins with SSL using an Nginx Reverse Proxy](https://www.digitalocean.com/community/tutorials/how-to-configure-jenkins-with-ssl-using-an-nginx-reverse-proxy) - Disable the Jenkins '8080' access when HTTPS is enabled.
- **Note:** If Jenkins displays a message like ***"It appears that your reverse proxy set up is broken"*** (when opening the *Management* page). Go to *"Manage Jenkins => Configure System => Jenkins URL"* and make sure it matches Nginx (proxy_redirect). For example, if all traffic is forwarded to *https*, the *Jenkin URL* should reflect that.
Not using `https` can produce the warning message.