From b119442a373c77d48a326430e4d16f9adb4f836d Mon Sep 17 00:00:00 2001
From: Brian Cunnie
Date: Thu, 20 Jan 2022 04:59:59 -0800
Subject: [PATCH] BOSH release: 2.4.0: metrics.status.sslip.io returns metrics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Also, I moved the "versio" endpoint: `version.sslip.io` →
`version.status.sslip.io`. It seemed to make more sense to corral the
special endpoints under `status`.
---
.../packages/golang-1-linux/index.yml | 4 ++++
.../packages/sslip.io-dns-server/index.yml | 4 ++++
.../packages/golang-1-linux/spec.lock | 2 +-
.../packages/sslip.io-dns-server/packaging | 4 ++--
bosh-release/releases/sslip.io/index.yml | 2 ++
.../releases/sslip.io/sslip.io-2.4.0.yml | 23 +++++++++++++++++++
docs/DEVELOPER.md | 15 ++++++------
k8s/Dockerfile-sslip.io-dns-server | 2 +-
k8s/document_root/index.html | 2 +-
spec/check-dns_spec.rb | 2 +-
10 files changed, 47 insertions(+), 13 deletions(-)
create mode 100644 bosh-release/releases/sslip.io/sslip.io-2.4.0.yml
diff --git a/bosh-release/.final_builds/packages/golang-1-linux/index.yml b/bosh-release/.final_builds/packages/golang-1-linux/index.yml
index 39dcfbf..9a27590 100644
--- a/bosh-release/.final_builds/packages/golang-1-linux/index.yml
+++ b/bosh-release/.final_builds/packages/golang-1-linux/index.yml
@@ -1,4 +1,8 @@
builds:
+ 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06:
+ version: 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06
+ blobstore_id: 6b71acab-8a9e-4a31-6a18-9528302cb7e7
+ sha1: sha256:1f4f73a903b8f59b46d9a8ff813961615126b843eafa991c7dc950ae9a2a0bf1
92655dbac2d36906f0d761ab03f2eb6bfa9a22730d8f1591a1acb7a6de875ed4:
version: 92655dbac2d36906f0d761ab03f2eb6bfa9a22730d8f1591a1acb7a6de875ed4
blobstore_id: c129564b-d431-4b01-6cc1-698d427d5bc0
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 5ce0997..0f02ac1 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
@@ -79,4 +79,8 @@ builds:
version: f14e1f7d3ecbc953136176b39b026e99360401f42c01b61db2083d7cc3f0a06e
blobstore_id: 7f1b9c5b-1eb2-4761-5212-f857dbf704d3
sha1: sha256:d87942b41f324af704c9cb6afa2c1dc321f810dc84599459404470ad07aa045f
+ f73fd57052c9a5e5372cd20cc4515bb4342ab25a634098cf94e81ccfa9e1f410:
+ version: f73fd57052c9a5e5372cd20cc4515bb4342ab25a634098cf94e81ccfa9e1f410
+ blobstore_id: 6ca340ef-c2f5-44af-5f3c-fb8a20754e8c
+ sha1: sha256:158e2ae0bf4043f538c5277a406dde1beb73a3443c2e44247df2dd560949d662
format-version: "2"
diff --git a/bosh-release/packages/golang-1-linux/spec.lock b/bosh-release/packages/golang-1-linux/spec.lock
index c701caa..6a14542 100644
--- a/bosh-release/packages/golang-1-linux/spec.lock
+++ b/bosh-release/packages/golang-1-linux/spec.lock
@@ -1,2 +1,2 @@
name: golang-1-linux
-fingerprint: 92655dbac2d36906f0d761ab03f2eb6bfa9a22730d8f1591a1acb7a6de875ed4
+fingerprint: 1ab563903c1f130ca908d3abdbf66650a395d3b77134474bff837aeed3649c06
diff --git a/bosh-release/packages/sslip.io-dns-server/packaging b/bosh-release/packages/sslip.io-dns-server/packaging
index 1b0abf4..1382553 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.3.0 \
+ldflags="-X xip/xip.VersionSemantic=2.4.0 \
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
- -X xip/xip.VersionGitHash=84ffaee"
+ -X xip/xip.VersionGitHash=916e89c"
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 085b46f..1dea4af 100644
--- a/bosh-release/releases/sslip.io/index.yml
+++ b/bosh-release/releases/sslip.io/index.yml
@@ -39,4 +39,6 @@ builds:
version: 2.2.4
dbbd518f-f17e-4f92-4878-327817590ec8:
version: 2.2.3
+ f9e9294d-f36a-4f2a-57c9-66db30679487:
+ version: 2.4.0
format-version: "2"
diff --git a/bosh-release/releases/sslip.io/sslip.io-2.4.0.yml b/bosh-release/releases/sslip.io/sslip.io-2.4.0.yml
new file mode 100644
index 0000000..a5fbb75
--- /dev/null
+++ b/bosh-release/releases/sslip.io/sslip.io-2.4.0.yml
@@ -0,0 +1,23 @@
+name: sslip.io
+version: 2.4.0
+commit_hash: "53378e4"
+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: f73fd57052c9a5e5372cd20cc4515bb4342ab25a634098cf94e81ccfa9e1f410
+ fingerprint: f73fd57052c9a5e5372cd20cc4515bb4342ab25a634098cf94e81ccfa9e1f410
+ sha1: sha256:158e2ae0bf4043f538c5277a406dde1beb73a3443c2e44247df2dd560949d662
+ dependencies:
+ - golang-1-linux
diff --git a/docs/DEVELOPER.md b/docs/DEVELOPER.md
index 3b67795..e499fe2 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.2.4
-export VERSION=2.3.0
+export OLD_VERSION=2.3.0
+export VERSION=2.4.0
cd ~/workspace/sslip.io
git pull -r --autostash
# update the version number for the TXT record for version.status.sslip.io
@@ -51,18 +51,19 @@ dig @$IP txt ip.sslip.io +short | tr -d '"'
curl curlmyip.org; echo
dig @$IP txt version.status.sslip.io +short | grep $VERSION
echo "\"$VERSION\""
-dig @$IP my-key.kv.sslip.io txt +short # returns nothing
+dig @$IP my-key.k-v.io txt +short # returns nothing
echo " ===" # separator because the results are too similar
-dig @$IP put.MyValue.my-key.kv.sslip.io txt +short
+dig @$IP put.MyValue.my-key.k-v.io txt +short
echo "\"MyValue\""
echo " ===" # separator because the results are too similar
-dig @$IP MY-KEY.kv.sslip.io txt +short
+dig @$IP MY-KEY.k-v.io txt +short
echo "\"MyValue\""
echo " ===" # separator because the results are too similar
-dig @$IP delete.my-key.kv.sslip.io txt +short
+dig @$IP delete.my-key.k-v.io txt +short
echo "\"MyValue\""
echo " ===" # separator because the results are too similar
-dig @$IP my-key.kv.sslip.io txt +short # returns nothing
+dig @$IP my-key.k-v.io txt +short # returns nothing
+dig @$IP metrics.status.sslip.io txt +short
pushd ..
git add -p
git ci -vm"BOSH release: $VERSION: kv.sslip.io key-value store"
diff --git a/k8s/Dockerfile-sslip.io-dns-server b/k8s/Dockerfile-sslip.io-dns-server
index 79f5084..c9953bc 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.3.0/sslip.io-dns-server-linux-$TARGETARCH \
+RUN wget https://github.com/cunnie/sslip.io/releases/download/2.4.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 b7d5201..0bfcc7e 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.3.0/sslip.io-dns-server-linux-amd64 -o dns-server
+curl -L https://github.com/cunnie/sslip.io/releases/download/2.4.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 511cf33..8176cf6 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.3.0'
+sslip_version = '2.4.0'
whois_nameservers = get_whois_nameservers(domain)
describe domain do