Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge deploy #61

Merged
merged 118 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
5dd1e4a
checks and creates the latest chall/chall<no.of.challenge>
ashpect May 27, 2023
60f19b2
simplify dir structure
ashpect May 27, 2023
1d72a77
recieve zip and put in folders
ashpect May 28, 2023
11347f1
unarchive zip
ashpect May 28, 2023
c79130f
get filename without hardcoded approach
ashpect May 30, 2023
148e855
static direct deployment
ashpect Jun 3, 2023
0b71196
challenge gets deployed
ashpect Jun 3, 2023
4c742d8
minor change
ashpect Jun 3, 2023
d941b55
increase file limit for fiber
ashpect Jun 4, 2023
6b11dad
update image build
ashpect Jun 4, 2023
5e81986
minor fixes and challcopy namechange
ashpect Jun 4, 2023
65cf7c4
update go.mod
ashpect Jun 4, 2023
0f779f3
Service struct
ashpect Jun 6, 2023
5a33648
Service creation
ashpect Jun 6, 2023
bcc648e
proper structure
ashpect Jun 6, 2023
6418322
deleteChall route
ashpect Jun 6, 2023
b472071
cleanup commit
ashpect Jun 7, 2023
c23285b
checks and creates the latest chall/chall<no.of.challenge>
ashpect May 27, 2023
e18dace
simplify dir structure
ashpect May 27, 2023
8066125
recieve zip and put in folders
ashpect May 28, 2023
7114f31
unarchive zip
ashpect May 28, 2023
02248b1
get filename without hardcoded approach
ashpect May 30, 2023
2e563a7
static direct deployment
ashpect Jun 3, 2023
8cdb5b4
challenge gets deployed
ashpect Jun 3, 2023
a33f704
minor change
ashpect Jun 3, 2023
f295360
increase file limit for fiber
ashpect Jun 4, 2023
8e0fa5c
update image build
ashpect Jun 4, 2023
c4cf84b
minor fixes and challcopy namechange
ashpect Jun 4, 2023
5878bac
update go.mod
ashpect Jun 4, 2023
7f5b6c7
Service struct
ashpect Jun 6, 2023
03d4bca
Service creation
ashpect Jun 6, 2023
7b59608
proper structure
ashpect Jun 6, 2023
3990145
deleteChall route
ashpect Jun 6, 2023
9b89c9b
cleanup commit
ashpect Jun 7, 2023
d38af68
Merge branch 'challengeDeploy' of github.com:sdslabs/katana into chal…
P3rcy-8685 Jun 7, 2023
c662a2a
ChallangeDeploy: expose challenge to localhost (minikube)
jainl28patel Jun 10, 2023
3aca0ab
finish deployement
P3rcy-8685 Jun 15, 2023
fc590df
allows cors all
P3rcy-8685 Jun 15, 2023
38d8b0e
fix bugs
P3rcy-8685 Jun 15, 2023
34b65a0
add root_directory as env var
P3rcy-8685 Jun 16, 2023
3bc57df
variable context timeout, refactor code
P3rcy-8685 Jun 17, 2023
0b93fc1
remove unnecessary token part
ashpect Jun 17, 2023
95b3aa2
remove int32ptr func
ashpect Jun 18, 2023
6da9a5c
merge cleanup
ashpect Jun 22, 2023
f4823a3
fix bug
ashpect Jun 22, 2023
988d6aa
fix issues
P3rcy-8685 Jun 23, 2023
e5df7ab
minor fix
ashpect Jun 25, 2023
e4afc3a
Minor fixes
Bisht13 Jun 25, 2023
55212b2
go mod tidy
Bisht13 Jun 25, 2023
cec86c9
Merge pull request #62 from sdslabs/deployement
Bisht13 Jun 25, 2023
6787802
Minor Fixes
Bisht13 Jun 27, 2023
8f15184
Add Harbor lib
Bisht13 Jul 11, 2023
0fbd0f9
Harbor manifest
ashpect Jul 11, 2023
44ac89f
Parse values to Harbor YAML
Bisht13 Jul 11, 2023
70b7024
fix bug
ashpect Jul 11, 2023
a335aed
Set Admin Password for Harbor
Bisht13 Jul 11, 2023
cae4d75
Generate certs
Bisht13 Jul 11, 2023
a23c095
Minor fix
ashpect Jul 11, 2023
bc05ca2
Populate Certs for Harbor
Bisht13 Jul 11, 2023
60fead4
Minor Fix
Bisht13 Jul 11, 2023
f61de8b
Add ca.crt to yml
Bisht13 Jul 11, 2023
417b8a4
Integrate Harbor into Katana
Bisht13 Jul 11, 2023
3c033e5
Setup Harbor backend
Bisht13 Jul 12, 2023
fac7e12
Finish Harbor
Bisht13 Jul 12, 2023
e939aff
update buildimage
ashpect Jul 12, 2023
3dafa43
Minor refractoring
Bisht13 Jul 12, 2023
9bb0217
Minor fixes
Bisht13 Jul 12, 2023
7e2ebb8
Final Touches of Harbor
Bisht13 Jul 13, 2023
a074e43
Remove redundent log + 69th commit
Bisht13 Jul 13, 2023
0a99a5f
Fix docker image build
ashpect Jul 13, 2023
4d05948
Update deleteChall
ashpect Jul 13, 2023
d16cdc4
minor fixes
ashpect Jul 13, 2023
33ae2d3
cleanup
ashpect Jul 13, 2023
04d7b4e
Merge branch 'challengeDeploy' of github.com:sdslabs/katana into chal…
ashpect Jul 13, 2023
fafd16b
Refractoring
Bisht13 Jul 14, 2023
46d58fd
Refractoring
Bisht13 Jul 14, 2023
42cdfba
change service
ashpect Jul 15, 2023
9c37f2c
Fix Gogs YAML
Bisht13 Jul 15, 2023
f31ac97
Add Ingress for exposing services
Bisht13 Jul 15, 2023
c003a7b
Add Ingress for mongo, mysql, gogs
Bisht13 Jul 15, 2023
71e6b45
Add Hosts for Ingress and refractor
Bisht13 Jul 15, 2023
a83ccfd
More refractoring
Bisht13 Jul 15, 2023
0463969
Template Mongo and MySQL yamls
Bisht13 Jul 15, 2023
8f27a00
Update go.mod for Dependabot alerts
Bisht13 Jul 15, 2023
e165535
Clean up
Bisht13 Jul 15, 2023
9fd45de
Minor fix
Bisht13 Jul 15, 2023
767e5cd
Change Harbor service to Ingress
Bisht13 Jul 16, 2023
31a0e2c
Minor fix
Bisht13 Jul 17, 2023
8b80af5
Add team ingress
Bisht13 Jul 17, 2023
38ebbd8
Refractor challengedeployerservice
Bisht13 Jul 30, 2023
2089f59
Add dynamic ingress host
Bisht13 Jul 30, 2023
1ed4e2c
Minor fixes
Bisht13 Jul 30, 2023
883ac3e
Update Team ingress on challenge deployment
Bisht13 Jul 30, 2023
111a460
minor flow update for make-set-env-prod
ashpect Jul 30, 2023
2efd655
minor fix
ashpect Jul 31, 2023
fd3dd69
Patching deployment
ashpect Jul 31, 2023
eb43d3a
minor testing-fix
ashpect Jul 31, 2023
66353c2
Team ingress via go client
Bisht13 Jul 31, 2023
205b9dd
Minor fixes
Bisht13 Jul 31, 2023
b8e1419
Minor fixes
Bisht13 Aug 1, 2023
fcb91fb
Fix YAMLs
Bisht13 Aug 1, 2023
b7e92f2
Fix infraSet infinite loop
Bisht13 Aug 1, 2023
5d645c4
LB's for katana setup services
ashpect Aug 5, 2023
ca9b696
fix code to add loadbalancer
P3rcy-8685 Aug 5, 2023
5a3f165
Minor fixes
Bisht13 Aug 5, 2023
28a6c69
Fix patching
P3rcy-8685 Aug 7, 2023
9008c03
Fix storage issue
Bisht13 Aug 7, 2023
cf58eac
finish aks patching
P3rcy-8685 Aug 8, 2023
4308482
Fix patching
Bisht13 Aug 8, 2023
7062d95
final patching
P3rcy-8685 Aug 8, 2023
4c60a18
Minor fixes
Bisht13 Aug 8, 2023
8a1723f
Remove all forms of ingress
Bisht13 Aug 9, 2023
09a77f8
expose harbor via katana-lb
ashpect Aug 9, 2023
9e4d32c
Remove ingress.yml and make harbor work
Bisht13 Aug 9, 2023
7806a82
Minor fixes
Bisht13 Aug 10, 2023
2be3187
Minor fixes
Bisht13 Aug 10, 2023
69f173b
Very minor fix
Bisht13 Aug 10, 2023
42c089d
clean up
Bisht13 Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ katana
test.go
vendor/*
*.log
teams/*
teams/*
teamcreds.txt
12 changes: 7 additions & 5 deletions config.sample.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
kubeconfig = ""
kubehost = "http://localhost"
backendurl = "http://192.168.49.1"
kubehost = "0.0.0.0"
backendurl = "http://192.168.49.1:3000"
rootdirectory = "/opt/katana"
kubenamespace = "default"
verbosity = 3

timeout = 20
numberofdeployements = 1
[cluster]
deploymentlabel = "katana"
broadcastcount = 2
broadcastlabel = "broadcast"
teamcount = 2
teamcount = 1
teamlabel = "ctfteam"
manifest_dir = "manifests/templates"
manifests = [
Expand All @@ -23,7 +25,7 @@ manifests = [
]

[services.api]
host = "localhost"
host = "0.0.0.0"
port = 3000

[services.challengedeployer]
Expand Down
25 changes: 14 additions & 11 deletions configs/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,18 @@ type MySQLCfg struct {
}

type KatanaCfg struct {
KubeHost string `toml:"kubehost"`
BackendUrl string `toml:"backendurl"`
KubeNameSpace string `toml:"kubenamespace"`
KubeConfig string `toml:"kubeconfig"`
LogFile string `toml:"logfile"`
Services ServicesCfg `toml:"services"`
Cluster ClusterCfg `toml:"cluster"`
Mongo MongoCfg `toml:"mongo"`
TeamVmConfig TeamChallengeConfig `toml:"teamvm"`
AdminConfig AdminCfg `toml:"admin"`
MySQL MySQLCfg `toml:"mysql"`
KubeHost string `toml:"kubehost"`
BackendUrl string `toml:"backendurl"`
RootDirectory string `toml:"rootdirectory"`
KubeNameSpace string `toml:"kubenamespace"`
KubeConfig string `toml:"kubeconfig"`
LogFile string `toml:"logfile"`
Services ServicesCfg `toml:"services"`
Cluster ClusterCfg `toml:"cluster"`
Mongo MongoCfg `toml:"mongo"`
TeamVmConfig TeamChallengeConfig `toml:"teamvm"`
AdminConfig AdminCfg `toml:"admin"`
MySQL MySQLCfg `toml:"mysql"`
TimeOut int `toml:"timeout"`
TeamDeployement int32 `toml:"numberofdeployements"`
}
50 changes: 20 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,40 @@ module github.com/sdslabs/katana
go 1.13

require (
github.com/Azure/go-autorest/autorest v0.9.6 // indirect
github.com/BurntSushi/toml v0.3.1
github.com/BurntSushi/toml v1.3.2
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/aws/aws-sdk-go v1.36.30 // indirect
github.com/cloudflare/circl v1.3.2 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v23.0.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633 // indirect
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
github.com/gliderlabs/ssh v0.3.5
github.com/go-git/go-billy/v5 v5.4.1 // indirect
github.com/go-git/go-git v4.7.0+incompatible // indirect
github.com/go-git/go-git/v5 v5.6.0 // indirect
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501 // indirect
github.com/go-git/go-git/v5 v5.6.0
github.com/go-sql-driver/mysql v1.7.0
github.com/gofiber/fiber/v2 v2.40.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/golang/protobuf v1.5.2
github.com/googleapis/gnostic v0.5.3 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/golang/protobuf v1.5.3
github.com/klauspost/compress v1.15.12 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/matryer/is v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mholt/archiver/v3 v3.5.1
github.com/onsi/ginkgo/v2 v2.9.4 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/rivo/uniseg v0.4.2 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/sirupsen/logrus v1.7.0
github.com/spf13/cobra v1.0.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4 // indirect
go.mongodb.org/mongo-driver v1.5.3
golang.org/x/crypto v0.7.0
golang.org/x/tools v0.7.0 // indirect
google.golang.org/grpc v1.33.0
google.golang.org/protobuf v1.28.1
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
golang.org/x/crypto v0.10.0
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/tools v0.10.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
k8s.io/api v0.26.2
k8s.io/apimachinery v0.26.2
k8s.io/client-go v0.26.2
Expand Down
Loading