forked from hswaw/hscloud
devtools: deploy hackdoc&depotview
Change-Id: If7ee65a99fae29f5015bb8ee8bb23e83c0f7dd3a
This commit is contained in:
parent
b180a145d4
commit
7480879222
3 changed files with 73 additions and 0 deletions
16
devtools/kube/depotview.libsonnet
Normal file
16
devtools/kube/depotview.libsonnet
Normal file
|
@ -0,0 +1,16 @@
|
|||
local mirko = import "../../kube/mirko.libsonnet";
|
||||
local kube = import "../../kube/kube.libsonnet";
|
||||
|
||||
{
|
||||
cfg:: {
|
||||
image: "registry.k0.hswaw.net/devtools/depotview:1586695514-ac43b3edac4df7964cbe349f8e39f6346871ea3d",
|
||||
},
|
||||
|
||||
component(cfg ,env):: mirko.Component(env, "depotview") {
|
||||
local depotview = self,
|
||||
cfg+: {
|
||||
image: cfg.image,
|
||||
container: depotview.GoContainer("main", "/devtools/depotview") {}
|
||||
},
|
||||
}
|
||||
}
|
31
devtools/kube/hackdoc.libsonnet
Normal file
31
devtools/kube/hackdoc.libsonnet
Normal file
|
@ -0,0 +1,31 @@
|
|||
local mirko = import "../../kube/mirko.libsonnet";
|
||||
local kube = import "../../kube/kube.libsonnet";
|
||||
|
||||
{
|
||||
cfg:: {
|
||||
image: "registry.k0.hswaw.net/devtools/hackdoc:1586734631-4b4a33a6931938f7651df1ae14133c979a924d15",
|
||||
publicFQDN: error "public FQDN must be set",
|
||||
},
|
||||
|
||||
component(cfg ,env):: mirko.Component(env, "hackdoc") {
|
||||
local hackdoc = self,
|
||||
cfg+: {
|
||||
image: cfg.image,
|
||||
container: hackdoc.GoContainer("main", "/devtools/hackdoc") {
|
||||
command+: [
|
||||
"-depotview=depotview.devtools-prod.svc.cluster.local:4200",
|
||||
"-hackdoc_url=https://%s" % [cfg.publicFQDN],
|
||||
"-pub_listen=0.0.0.0:8080",
|
||||
],
|
||||
},
|
||||
ports+: {
|
||||
publicHTTP: {
|
||||
public: {
|
||||
port: 8080,
|
||||
dns: cfg.publicFQDN,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
26
devtools/kube/prod.jsonnet
Normal file
26
devtools/kube/prod.jsonnet
Normal file
|
@ -0,0 +1,26 @@
|
|||
local mirko = import "../../kube/mirko.libsonnet";
|
||||
|
||||
local depotview = import "depotview.libsonnet";
|
||||
local hackdoc = import "hackdoc.libsonnet";
|
||||
|
||||
{
|
||||
devtools(name):: mirko.Environment(name) {
|
||||
local env = self,
|
||||
local cfg = self.cfg,
|
||||
|
||||
cfg+: {
|
||||
depotview: depotview.cfg,
|
||||
hackdoc: hackdoc.cfg {
|
||||
publicFQDN: "hackdoc.hackerspace.pl",
|
||||
},
|
||||
},
|
||||
|
||||
components: {
|
||||
depotview: depotview.component(cfg.depotview, env),
|
||||
hackdoc: hackdoc.component(cfg.hackdoc, env),
|
||||
},
|
||||
},
|
||||
|
||||
prod: self.devtools("devtools-prod") {
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue