Skip to content

Instantly share code, notes, and snippets.

@deanturpin
Last active August 27, 2019 09:31
Show Gist options
  • Save deanturpin/8c1b27885135188454c5a99d2aabeff2 to your computer and use it in GitHub Desktop.
Save deanturpin/8c1b27885135188454c5a99d2aabeff2 to your computer and use it in GitHub Desktop.
```bash
sudo ufw enable
sudo ufw allow 8080
sudo ufw status
```
  • Create a Google Cloud instance using f1-micro
  • Select boot disk Ubuntu 19.04 minimal
  • Allow HTTP and HTTPS traffic
sudo apt update && \
sudo apt install openjdk-8-jdk vim iputils-ping ufw -y

Jenkins runs with Java 8 so set it as the default

sudo update-alternatives --config java
  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 

Install Jenkins.

wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - && \
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' && \
sudo apt update && \
sudo apt install jenkins -y

Confirm the service is running.

sudo systemctl status jenkins

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment