diff options
author | Vincent Ambo <vincent@kivra.com> | 2016-03-03T21·44+0100 |
---|---|---|
committer | Vincent Ambo <vincent@kivra.com> | 2016-03-03T21·44+0100 |
commit | 2ff9b1bd3c4537b1102006f0c2c54ff1ea631548 (patch) | |
tree | 82bd2851660777811ce210794ee90055d836f917 | |
parent | 83eb026d3e441294419e7edce96f2d745b7266ef (diff) |
[bitlbee] Entire bitlbee setup
-rw-r--r-- | bitlbee/Dockerfile | 24 | ||||
-rw-r--r-- | bitlbee/bitlbee-rc.yaml | 38 | ||||
-rw-r--r-- | bitlbee/bitlbee-svc.yaml | 15 | ||||
-rw-r--r-- | bitlbee/bitlbee.conf | 11 | ||||
-rw-r--r-- | bitlbee/motd.txt | 6 | ||||
-rw-r--r-- | bitlbee/stunnel.conf | 9 |
6 files changed, 103 insertions, 0 deletions
diff --git a/bitlbee/Dockerfile b/bitlbee/Dockerfile new file mode 100644 index 000000000000..ea87d16284bd --- /dev/null +++ b/bitlbee/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine +MAINTAINER Vincent Ambo <tazjin@gmail.com> + +# Install bitlbee packages +RUN apk update && \ + apk add bitlbee bitlbee-otr bitlbee-doc ca-certificates curl gnutls + +# Install stunnel +RUN echo "http://dl-3.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories +RUN apk update && apk add stunnel + +# Add a user for bitlbee +RUN adduser -D bitlbee + +# Add bitlbee configuration +ADD bitlbee.conf /etc/bitlbee/bitlbee.conf +ADD motd.txt /etc/bitlbee/motd.txt + +# Add stunnel configuration +ADD stunnel.conf /etc/bitlbee/stunnel.conf + +EXPOSE 6697 + +CMD bitlbee -F && stunnel /etc/bitlbee/stunnel.conf diff --git a/bitlbee/bitlbee-rc.yaml b/bitlbee/bitlbee-rc.yaml new file mode 100644 index 000000000000..676ff06229f8 --- /dev/null +++ b/bitlbee/bitlbee-rc.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: v1 +kind: ReplicationController +metadata: + name: bitlbee-v1 + labels: + app: bitlbee + spec: v1 +spec: + replicas: 1 + selector: + app: bitlbee + spec: v1 + template: + metadata: + labels: + app: bitlbee + spec: v1 + spec: + containers: + - image: eu.gcr.io/composite-watch-759/bitlbee + imagePullPolicy: Always + name: bitlbee + volumeMounts: + - name: tazj-in-tls + mountPath: /etc/bitlbee/tls + - name: bitlbee-storage + mountPath: /var/lib/bitlbee + ports: + - containerPort: 6697 + volumes: + - name: tazj-in-tls + secret: + secretName: tazj-in-tls + - name: bitlbee-storage + gcePersistentDisk: + pdName: bitlbee-storage + fsType: ext4 diff --git a/bitlbee/bitlbee-svc.yaml b/bitlbee/bitlbee-svc.yaml new file mode 100644 index 000000000000..956e02a4186b --- /dev/null +++ b/bitlbee/bitlbee-svc.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: bitlbee + labels: + app: bitlbee +spec: + type: LoadBalancer + selector: + app: bitlbee + ports: + - port: 6697 + targetPort: 6697 + name: irc-tls diff --git a/bitlbee/bitlbee.conf b/bitlbee/bitlbee.conf new file mode 100644 index 000000000000..0903a991c089 --- /dev/null +++ b/bitlbee/bitlbee.conf @@ -0,0 +1,11 @@ +[settings] +User = bitlbee +HostName = bitlbee.tazj.in +ConfigDir = /var/lib/bitlbee + +AuthMode = Closed +AuthPassword = md5:sehKBm6gtplh6/K0Dn6DOo0crlRH +OperPassword = md5:lP81y2wzU5pSwOtTEI37ewrSSlda + +[defaults] +private = 1 diff --git a/bitlbee/motd.txt b/bitlbee/motd.txt new file mode 100644 index 000000000000..98d8c37d9bf4 --- /dev/null +++ b/bitlbee/motd.txt @@ -0,0 +1,6 @@ +Welcome to tazjin's bitlbee server! + +While this server may appear as if it's open to the public, you are in no way +safe from me reading your communication or randomly terminating the service. + +Use at your own peril, unless you are me. diff --git a/bitlbee/stunnel.conf b/bitlbee/stunnel.conf new file mode 100644 index 000000000000..126518f3499b --- /dev/null +++ b/bitlbee/stunnel.conf @@ -0,0 +1,9 @@ +setuid = nobody +setgid = nogroup +foreground = yes + +[bitlbee] +accept = 6697 +connect = 6667 +cert = /etc/bitlbee/tls/tls.key +key = /etc/bitlbee/tls/tls.crt |