initial commit
This commit is contained in:
commit
1f3c48fca2
|
@ -0,0 +1,2 @@
|
||||||
|
swarm
|
||||||
|
.DS_Store
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM scratch
|
||||||
|
COPY swarm /
|
||||||
|
ENTRYPOINT ["/swarm"]
|
|
@ -0,0 +1,16 @@
|
||||||
|
.PHONY: swarm
|
||||||
|
swarm:
|
||||||
|
go build -o swarm cmd/swarm/main.go
|
||||||
|
|
||||||
|
.PHONY: linux
|
||||||
|
linux:
|
||||||
|
GOOS=linux GOARCH=amd64 go build -o swarm -ldflags '-w -s' cmd/swarm/main.go
|
||||||
|
#GOOS=linux GOARCH=amd64 go build -o swarm cmd/swarm/main.go
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -vf swarm
|
||||||
|
|
||||||
|
.PHONY: image
|
||||||
|
image: linux
|
||||||
|
docker build -t dockermirror:5000/dpedu/antiroachswarm .
|
|
@ -0,0 +1,24 @@
|
||||||
|
# antiroachlol
|
||||||
|
|
||||||
|
## Building server binary
|
||||||
|
|
||||||
|
```
|
||||||
|
# A stripped binary
|
||||||
|
# You need golang...
|
||||||
|
go build -ldflags="-w -s" ./...
|
||||||
|
```
|
||||||
|
## Building docker
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build -t antiroachlol
|
||||||
|
docker tag antiroachlol your.docker.endpoint.here/name
|
||||||
|
docker push your.docker.endpoint.here/name
|
||||||
|
|
||||||
|
```
|
||||||
|
## Building kubernetes
|
||||||
|
|
||||||
|
Edit `antiroach.yml` to match the docker name and desired replicas you put above and then apply it
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl apply -f antiroach.yml
|
||||||
|
```
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
namespace:
|
||||||
|
name: antiroachlol
|
||||||
|
labels:
|
||||||
|
app: antiroachlol
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: antiroachlol
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: antiroachlol
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: antiroachlol
|
||||||
|
image: dockermirror:5000/dpedu/antiroachswarm
|
||||||
|
env:
|
||||||
|
- name: IRC_SERVER
|
||||||
|
value: irc.129irc.com:6667
|
||||||
|
- name: IRC_CHANNEL
|
||||||
|
value: "#ansi"
|
||||||
|
- name: IRC_VICTIM
|
||||||
|
value: antiroach
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue