summary refs log tree commit diff
path: root/services
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-06-29T13·01+0100
committerVincent Ambo <tazjin@google.com>2019-06-29T13·01+0100
commit47f2145b5b39b63500fe2d9d0a64edc44edaa793 (patch)
treef79bdce9a8683851e648576b47147463d04193c2 /services
parent85dbb4cc238c1e4b1b49806c0728c891a9a0acf7 (diff)
chore(tazblog): Remove files from ye olde times
Diffstat (limited to 'services')
-rw-r--r--services/tazblog/Dockerfile19
-rw-r--r--services/tazblog/Makefile17
-rw-r--r--services/tazblog/TODO1
-rw-r--r--services/tazblog/backup.sh2
-rw-r--r--services/tazblog/k8s/tazblog-db-rc.yaml26
-rw-r--r--services/tazblog/k8s/tazblog-db-service.yaml12
-rw-r--r--services/tazblog/k8s/tazblog-rc.yaml45
-rw-r--r--services/tazblog/k8s/tazblog-svc.yaml17
-rw-r--r--services/tazblog/stack.yaml12
-rw-r--r--services/tazblog/varnish/Dockerfile16
-rw-r--r--services/tazblog/varnish/default.vcl60
11 files changed, 0 insertions, 227 deletions
diff --git a/services/tazblog/Dockerfile b/services/tazblog/Dockerfile
deleted file mode 100644
index 7d8b60582655..000000000000
--- a/services/tazblog/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-FROM fpco/stack-build
-MAINTAINER Vincent Ambo <dev@tazj.in>
-
-# Cache dependencies
-ADD stack.yaml tazblog.cabal /opt/tazblog/
-WORKDIR /opt/tazblog
-RUN stack build --only-dependencies
-
-# Base setup
-VOLUME /var/tazblog
-EXPOSE 8000 8070
-ENV PATH /root/.local/bin:$PATH
-
-# Build blog
-ADD . /opt/tazblog
-RUN stack install && cp /root/.local/bin/tazblog* /usr/bin/
-
-# Done!
-CMD tazblog
diff --git a/services/tazblog/Makefile b/services/tazblog/Makefile
deleted file mode 100644
index 00d77dd36cfd..000000000000
--- a/services/tazblog/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-VERSION=$(shell bash -c "grep -P -o -e '\d\.\d$$' TazBlog.cabal | head -n1")
-ARCH_PKG=arch/tazblog-$(VERSION)-1-x86_64.pkg.tar.xz
-export ARCH_PKG
-
-all: archpkg docker
-
-archpkg: $(ARCH_PKG)
-
-$(ARCH_PKG):
-	cd arch && makepkg
-
-docker: archpkg
-	cat Dockerfile.raw | envsubst > Dockerfile; \
-	docker build -t tazjin/tazblog .
-
-clean:
-	rm -rf dist arch/*.pkg.tar.xz arch/pkg arch/src arch/*. Dockerfile
diff --git a/services/tazblog/TODO b/services/tazblog/TODO
deleted file mode 100644
index fdb963dd790a..000000000000
--- a/services/tazblog/TODO
+++ /dev/null
@@ -1 +0,0 @@
-* Bootstrap: http://twitter.github.com/bootstrap/index.html
diff --git a/services/tazblog/backup.sh b/services/tazblog/backup.sh
deleted file mode 100644
index bbc316732498..000000000000
--- a/services/tazblog/backup.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-tar cf backup.tar BlogState/
diff --git a/services/tazblog/k8s/tazblog-db-rc.yaml b/services/tazblog/k8s/tazblog-db-rc.yaml
deleted file mode 100644
index 26d730c4df27..000000000000
--- a/services/tazblog/k8s/tazblog-db-rc.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: tazblog-db
-spec:
-  selector:
-    app: tazblog-db
-  template:
-    metadata:
-      labels:
-        app: tazblog-db
-    spec:
-      containers:
-        - image: tazjin/tazblog-haskell:master
-          name: tazblog-db
-          command: ["tazblog-db"]
-          ports:
-            - containerPort: 8070
-          volumeMounts:
-            - name: tazblog-state
-              mountPath: /var/tazblog
-      volumes:
-        - name: tazblog-state
-          gcePersistentDisk:
-            pdName: tazblog-state
-            fsType: ext4
diff --git a/services/tazblog/k8s/tazblog-db-service.yaml b/services/tazblog/k8s/tazblog-db-service.yaml
deleted file mode 100644
index 6d5d42946914..000000000000
--- a/services/tazblog/k8s/tazblog-db-service.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: tazblog-db
-  labels:
-    app: tazblog-db
-spec:
-  selector:
-    app: tazblog-db
-  ports:
-    - port: 8070
-      name: tazblog-db
diff --git a/services/tazblog/k8s/tazblog-rc.yaml b/services/tazblog/k8s/tazblog-rc.yaml
deleted file mode 100644
index b29a4d5d7591..000000000000
--- a/services/tazblog/k8s/tazblog-rc.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: tazblog-5.1.3
-spec:
-  replicas: 2
-  selector:
-    app: tazblog
-    version: v5.1.3
-  template:
-    metadata:
-      labels:
-        app: tazblog
-        version: v5.1.3
-    spec:
-      containers:
-        - image: tazjin/tazblog-haskell:master
-          imagePullPolicy: Always
-          name: tazblog
-          command: ["tazblog", "--dbHost", "tazblog-db.default.svc.cluster.local"]
-          ports:
-            - containerPort: 8000
-        - image: tazjin/varnish
-          imagePullPolicy: Always
-          name: tazblog-varnish
-          ports:
-            - containerPort: 6081
-            - containerPort: 6082
-        - image: tazjin/hitch:master
-          imagePullPolicy: Always
-          name: tazblog-hitch
-          command: ["hitch", "--backend=[127.0.0.1]:6083", "--write-proxy", "--user=hitch", "/etc/hitch/ssl/tazblog-tls"]
-          ports:
-            - containerPort: 8443
-          volumeMounts:
-            - name: tazblog-tls
-              readOnly: true
-              mountPath: /etc/hitch/ssl
-          resources:
-            requests:
-              memory: "1024Mi"
-      volumes:
-        - name: tazblog-tls
-          secret:
-            secretName: tazblog-tls
diff --git a/services/tazblog/k8s/tazblog-svc.yaml b/services/tazblog/k8s/tazblog-svc.yaml
deleted file mode 100644
index 6a2d9a422381..000000000000
--- a/services/tazblog/k8s/tazblog-svc.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: tazblog
-  labels:
-    app: tazblog
-spec:
-  type: LoadBalancer
-  selector:
-    app: tazblog
-  ports:
-    - port: 80
-      targetPort: 6081
-      name: tazblog-http
-    - port: 443
-      targetPort: 8443
-      name: tazblog-https
diff --git a/services/tazblog/stack.yaml b/services/tazblog/stack.yaml
deleted file mode 100644
index 8841429aa0d0..000000000000
--- a/services/tazblog/stack.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
-
-resolver: lts-9.20
-packages:
-- '.'
-extra-deps:
-  - acid-state-0.14.3
-  - ixset-1.0.7
-  - rss-3000.2.0.6
-  - syb-with-class-0.6.1.8
-flags: {}
-extra-package-dbs: []
diff --git a/services/tazblog/varnish/Dockerfile b/services/tazblog/varnish/Dockerfile
deleted file mode 100644
index 83733b527d31..000000000000
--- a/services/tazblog/varnish/Dockerfile
+++ /dev/null
@@ -1,16 +0,0 @@
-FROM centos:7
-MAINTAINER Vincent Ambo <hej@tazj.in>
-
-EXPOSE 6081 6082 6083
-
-RUN yum install -y epel-release && \
-    rpm --nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.1.el7.rpm && \
-    yum install -y varnish
-
-ADD default.vcl /etc/varnish/default.vcl
-
-CMD ulimit -n 131072 && \
-    /usr/sbin/varnishd -F -f /etc/varnish/default.vcl \
-                       -a :6081 -T :6082 -a :6083,PROXY -t 120 \
-                       -p thread_pool_min=5 -p thread_pool_max=500\
-                       -p thread_pool_timeout=300
diff --git a/services/tazblog/varnish/default.vcl b/services/tazblog/varnish/default.vcl
deleted file mode 100644
index 5a15d21a9c98..000000000000
--- a/services/tazblog/varnish/default.vcl
+++ /dev/null
@@ -1,60 +0,0 @@
-vcl 4.0;
-import std;
-
-# By default, Varnish will run on the same servers as the blog. Inside of
-# Kubernetes this will be inside the same pod.
-
-backend default {
-        .host = "localhost";
-        .port = "8000";
-}
-
-# Purge requests should be accepted from localhost
-acl purge {
-        "localhost";
-}
-
-sub vcl_recv {
-        # Allow HTTP PURGE from ACL above
-        if (req.method == "PURGE" && client.ip ~ purge) {
-                return (purge);
-        }
-
-        # Don't cache admin page
-        if (req.url ~ "^/admin") {
-                return (pass);
-        }
-
-        # Redirect non-www to www and non-HTTPS to HTTPS
-        if (req.http.host ~ "^tazj.in" || std.port(local.ip) == 6081) {
-                return (synth (750, ""));
-        }
-}
-
-sub vcl_backend_response {
-        # Cache everything for at least 1 minute.
-        if (beresp.ttl < 1m) {
-                set beresp.ttl = 1m;
-        }
-}
-
-sub vcl_deliver {
-        # Add an HSTS header to everything
-        set resp.http.Strict-Transport-Security = "max-age=31536000;includeSubdomains;preload";
-
-        if (obj.hits > 0) {
-                set resp.http.X-Cache = "HIT";
-        } else {
-                set resp.http.X-Cache = "MISS";
-        }
-}
-
-sub vcl_synth {
-        # Execute TLS or www. redirect
-        if (resp.status == 750) {
-                set resp.http.Location = "https://www.tazj.in" + req.url;
-                set resp.http.Strict-Transport-Security = "max-age=31536000;includeSubdomains;preload";
-                set resp.status = 301;
-                return (deliver);
-        }
-}