diff --git a/bin/make_all b/bin/make_all index 0c47a8f..a299e3b 100755 --- a/bin/make_all +++ b/bin/make_all @@ -4,7 +4,7 @@ # DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd $DIR/../src/sslip.io-dns-server -ldflags="-X xip/xip.VersionSemantic=2.4.2 \ +ldflags="-X xip/xip.VersionSemantic=2.5.0 \ -X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \ -X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)" export GOOS GOARCH diff --git a/bosh-release/.final_builds/packages/sslip.io-dns-server/index.yml b/bosh-release/.final_builds/packages/sslip.io-dns-server/index.yml index 3acb522..ff950d4 100644 --- a/bosh-release/.final_builds/packages/sslip.io-dns-server/index.yml +++ b/bosh-release/.final_builds/packages/sslip.io-dns-server/index.yml @@ -83,6 +83,10 @@ builds: version: df5ffc9ec5c9fc30f607f7cc76b794577065e20282673b748722428456b28a6d blobstore_id: 255ab1bc-1f92-4013-4300-22c2f2efa39e sha1: sha256:14f0df3489754079cde355badf8382126ebc8519eb40cb15e44ac30a45b3c2d4 + edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27: + version: edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27 + blobstore_id: 36ad0840-3dcd-4b0d-4550-0ece77007743 + sha1: sha256:25d4d67beedd6926f36d7c9be765495c1a31173a0c2da86d9a28bc916e928dfb f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e: version: f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e blobstore_id: 7f1b9c5b-1eb2-4761-5212-f857dbf704d3 diff --git a/bosh-release/packages/sslip.io-dns-server/packaging b/bosh-release/packages/sslip.io-dns-server/packaging index 1e27483..d51fd7c 100644 --- a/bosh-release/packages/sslip.io-dns-server/packaging +++ b/bosh-release/packages/sslip.io-dns-server/packaging @@ -5,9 +5,9 @@ source /var/vcap/packages/golang-1-linux/bosh/compile.env mkdir src ${BOSH_INSTALL_TARGET}/bin mv sslip.io-dns-server/{go.*,main.go,xip} src/ cd src/ -ldflags="-X xip/xip.VersionSemantic=2.4.2 \ +ldflags="-X xip/xip.VersionSemantic=2.5.0 \ -X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \ - -X xip/xip.VersionGitHash=1e6fae4" + -X xip/xip.VersionGitHash=7831e3c" go build \ -ldflags="$ldflags" \ -o ${BOSH_INSTALL_TARGET}/bin/sslip.io-dns-server diff --git a/bosh-release/releases/sslip.io/index.yml b/bosh-release/releases/sslip.io/index.yml index bd76ebe..e0da3c4 100644 --- a/bosh-release/releases/sslip.io/index.yml +++ b/bosh-release/releases/sslip.io/index.yml @@ -1,6 +1,8 @@ builds: 1c4de423-584b-42b9-59ab-93a123c96307: version: 1.2.0 + 2b0eb400-814f-4ce4-6046-c1cfda040d70: + version: 2.5.0 43640b61-afe3-4bc0-79ed-4e279f286041: version: 2.4.1 516ea48d-0717-494d-4082-9d8f0ab937df: diff --git a/bosh-release/releases/sslip.io/sslip.io-2.5.0.yml b/bosh-release/releases/sslip.io/sslip.io-2.5.0.yml new file mode 100644 index 0000000..10cbf61 --- /dev/null +++ b/bosh-release/releases/sslip.io/sslip.io-2.5.0.yml @@ -0,0 +1,23 @@ +name: sslip.io +version: 2.5.0 +commit_hash: ae8dee5 +uncommitted_changes: false +jobs: +- name: sslip.io-dns-server + version: 308acb7c186a042bc2ca4c28b83c9fe7589a64c48ab6a11869c442bcaea8fdf9 + fingerprint: 308acb7c186a042bc2ca4c28b83c9fe7589a64c48ab6a11869c442bcaea8fdf9 + sha1: sha256:6ca6f2c11816a82ecb3cf9300ea59369977cbaa7c39eddca35628a7c6b9b5b45 + packages: + - sslip.io-dns-server +packages: +- name: golang-1-linux + version: 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06 + fingerprint: 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06 + sha1: sha256:1f4f73a903b8f59b46d9a8ff813961615126b843eafa991c7dc950ae9a2a0bf1 + dependencies: [] +- name: sslip.io-dns-server + version: edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27 + fingerprint: edf1e15a3ab5233bc2c6247e2aadbcf1e165ab168f535ee1aacc0a4ad78c3f27 + sha1: sha256:25d4d67beedd6926f36d7c9be765495c1a31173a0c2da86d9a28bc916e928dfb + dependencies: + - golang-1-linux diff --git a/docs/DEVELOPER.md b/docs/DEVELOPER.md index 3d8e8f4..f2c1c20 100644 --- a/docs/DEVELOPER.md +++ b/docs/DEVELOPER.md @@ -4,8 +4,8 @@ These instructions are meant primarily for me when deploying a new BOSH release; they might not make sense unless you're on my workstation. ```bash -export OLD_VERSION=2.4.1 -export VERSION=2.4.2 +export OLD_VERSION=2.4.2 +export VERSION=2.5.0 cd ~/workspace/sslip.io git pull -r --autostash # update the version number for the TXT record for version.status.sslip.io @@ -20,15 +20,20 @@ sed -i '' "s~/$OLD_VERSION/~/$VERSION/~g" \ # update the git hash for the TXT record for version.status.sslip.io for BOSH release sed -i '' "s/VersionGitHash=[0-9a-fA-F]*/VersionGitHash=$(git rev-parse --short HEAD)/g" \ bosh-release/packages/sslip.io-dns-server/packaging +# let's get the BOSH creds cd bosh-release/ lpass show a # refresh LastPass token . ~/workspace/deployments/.envrc # set BOSH auth export BOSH_DEPLOYMENT=sslip.io-dns-server +# create the BOSH release bosh create-release --force +# upload the release bosh upload-release +# deploy the release bosh -n -d sslip.io-dns-server deploy ~/workspace/deployments/sslip.io-dns-server.yml --recreate -bosh instances # record the IP address of the instance -IP=$(bosh is --json | jq -r '.Tables[0].Rows[0].ips') +# find the IP of the deployed DNS server +IP=$(bosh is --json | jq -r '.Tables[0].Rows[0].ips'); echo $IP +# run the tests! dig +short 127.0.0.1.example.com @$IP echo 127.0.0.1 dig +short ns example.com @$IP @@ -65,18 +70,25 @@ echo " ===" # separator because the results are too similar dig @$IP my-key.k-v.io txt +short # returns nothing dig @$IP metrics.status.sslip.io txt +short | grep '"queries: ' echo '"queries: 16"' +# pop up a directory pushd .. +# let's add our changes git add -p -git ci -vm"BOSH release: $VERSION: kv.sslip.io key-value store" +# and commit (but DON'T push) +git ci -vm"BOSH release: $VERSION: block phishers" popd +# upload the blobs bosh upload-blobs +# create the release bosh create-release \ --final \ --tarball ~/Downloads/sslip.io-release-${VERSION}.tgz \ --version ${VERSION} +# add the changes git add -N releases/ .final_builds/ git add -p git ci --amend +# tag the release git tag $VERSION git push git push --tags diff --git a/k8s/Dockerfile-sslip.io-dns-server b/k8s/Dockerfile-sslip.io-dns-server index 5c097ba..771198a 100644 --- a/k8s/Dockerfile-sslip.io-dns-server +++ b/k8s/Dockerfile-sslip.io-dns-server @@ -26,7 +26,7 @@ LABEL maintainer="brian.cunnie@gmail.com" RUN apk update && apk add bind-tools ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2) -RUN wget https://github.com/cunnie/sslip.io/releases/download/2.4.2/sslip.io-dns-server-linux-$TARGETARCH \ +RUN wget https://github.com/cunnie/sslip.io/releases/download/2.5.0/sslip.io-dns-server-linux-$TARGETARCH \ -O /usr/sbin/sslip.io-dns-server; \ chmod 755 /usr/sbin/sslip.io-dns-server diff --git a/k8s/document_root/index.html b/k8s/document_root/index.html index 03576bd..3718b60 100644 --- a/k8s/document_root/index.html +++ b/k8s/document_root/index.html @@ -156,7 +156,7 @@ src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"> example, we install & run our server within a docker container:

 docker run -it --rm fedora
-curl -L https://github.com/cunnie/sslip.io/releases/download/2.4.2/sslip.io-dns-server-linux-amd64 -o dns-server
+curl -L https://github.com/cunnie/sslip.io/releases/download/2.5.0/sslip.io-dns-server-linux-amd64 -o dns-server
 chmod +x dns-server
 ./dns-server 2> dns-server.log &
 dnf install -y bind-utils
diff --git a/spec/check-dns_spec.rb b/spec/check-dns_spec.rb
index 4691c52..cc7524c 100644
--- a/spec/check-dns_spec.rb
+++ b/spec/check-dns_spec.rb
@@ -18,7 +18,7 @@ def get_whois_nameservers(domain)
 end
 
 domain = ENV['DOMAIN'] || 'example.com'
-sslip_version = '2.4.2'
+sslip_version = '2.5.0'
 whois_nameservers = get_whois_nameservers(domain)
 
 describe domain do