initial commit
This commit is contained in:
commit
1f3c48fca2
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
swarm
|
||||
.DS_Store
|
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM scratch
|
||||
COPY swarm /
|
||||
ENTRYPOINT ["/swarm"]
|
16
Makefile
Normal file
16
Makefile
Normal file
@ -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 .
|
24
README.md
Normal file
24
README.md
Normal file
@ -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
|
||||
```
|
28
antiroach.yml
Normal file
28
antiroach.yml
Normal file
@ -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
|
97
cmd/swarm/main.go
Normal file
97
cmd/swarm/main.go
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user