Skip to content

Instantly share code, notes, and snippets.

@DazWilkin
DazWilkin / cloudbuild.yaml
Created August 31, 2018 17:57
Cloud Build, Golang & App Engine
substitutions:
_APP: github.com/DazWilkin/hellohenry
_BUCKET: dazwilkin-180831-bucket
steps:
- name: "gcr.io/cloud-builders/go"
args:
- get
- "google.golang.org/appengine"
env:
@DazWilkin
DazWilkin / cloudbuild.yaml
Created August 31, 2018 17:32
Cloud Build for App Engine Golang (SO: 52118034)
steps:
- name: "gcr.io/cloud-builders/go"
args:
- get
- "google.golang.org/appengine"
env:
- "GOPATH=go"
- name: "gcr.io/cloud-builders/gcloud"
@DazWilkin
DazWilkin / example.com
Created August 22, 2018 20:56
CoreDNS
$ORIGIN example.com.
@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. (
2017042745 ; serial
7200 ; refresh (2 hours)
3600 ; retry (1 hour)
1209600 ; expire (2 weeks)
3600 ; minimum (1 hour)
)
3600 IN NS a.iana-servers.net.
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-dns
namespace: kube-system
data:
stubDomains: |
{"example.com": ["${DNS}"]}
upstreamNameservers: |
["8.8.8.8", "8.8.4.4"]
@DazWilkin
DazWilkin / Corefile
Created August 22, 2018 16:43
CoreDNS
example.com {
file /tmp/example.com
prometheus
errors
log
}
example.org {
file /tmp/example.org
prometheus # enable metrics
errors # show errors
@DazWilkin
DazWilkin / example.com
Last active August 22, 2018 16:40
CoreDNS
$ORIGIN example.com.
@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. (
2017042745 ; serial
7200 ; refresh (2 hours)
3600 ; retry (1 hour)
1209600 ; expire (2 weeks)
3600 ; minimum (1 hour)
)
3600 IN NS a.iana-servers.net.
@DazWilkin
DazWilkin / pom.xml
Created August 21, 2018 15:39
Cloud Build is not just for containers
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>hellohenry</artifactId>
<version>0.1</version>
@DazWilkin
DazWilkin / HelloHenry.java
Created August 21, 2018 02:03
Cloud Build is not just for containers
package example;
public class HelloHenry {
public static void main(String[] args) {
System.out.println("Hello Henry!");
}
}
@DazWilkin
DazWilkin / cloudbuild.yaml
Created August 20, 2018 23:16
Cloud Build is not just for containers
steps:
- name: "gcr.io/cloud-builders/javac"
args:
- "${_JAVA}"
timeout: 500s
artifacts:
objects:
location: "gs://${_BUCKET}/"
paths:
- "${_CLASS}"
@DazWilkin
DazWilkin / cloudbuild.yaml
Last active August 20, 2018 22:58
Cloud Build is not just for containers
steps:
- name: "gcr.io/cloud-builders/mvn"
args:
- package
artifacts:
objects:
location: "gs://${_BUCKET}/"
paths:
- "target/${_TARGET}"