This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build Image | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cp -a terraform.tfvars.example terraform.tfvars | |
$ vim terraform.tfvars | |
project = "<GCP_PROJECT_NAME>" | |
region = "europe-west2" | |
instance_name = "nginx-custom-instance" | |
instance_machine_type = "n1-standard-1" | |
instance_zone = "europe-west2-a" | |
instance_image = "<GCP_PROJECT_NAME>/webserver" | |
subnet_name = "default" | |
tags = ["webserver"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update -y | |
sudo apt install -y nginx | |
sudo mv /tmp/index.html /var/www/html/index.html | |
sudo systemctl enable nginx | |
sudo systemctl start nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello, World | |
This file was deployed by Packer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"builders": [ | |
{ | |
"type": "googlecompute", | |
"account_file": "credentials.json", | |
"project_id": "<GCP_PROJECT_NAME>", | |
"zone": "europe-west2-a", | |
"source_image_family": "ubuntu-1604-lts", | |
"ssh_username": "packer", | |
"image_name": "nginx-{{timestamp}}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: adapter-pod | |
labels: | |
app: adapter-app | |
spec: | |
volumes: | |
- name: logs | |
emptyDir: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: ambassador-pod | |
labels: | |
app: ambassador-app | |
spec: | |
volumes: | |
- name: shared | |
emptyDir: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: sidecar-pod | |
spec: | |
volumes: | |
- name: logs | |
emptyDir: {} | |
containers: | |
- name: app-container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: require-app-label | |
spec: | |
validationFailureAction: enforce | |
rules: | |
- name: check-for-app-label | |
match: | |
resources: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kyverno.io/v1 | |
kind: ClusterPolicy | |
metadata: | |
name: "default" | |
spec: | |
rules: | |
- name: "default-deny" | |
match: | |
resources: | |
kinds: |