forked from hswaw/hscloud
wow: init
This is a shitty MMORPG server. Private. Do not touch. Change-Id: Iddfce069f5895632d305a73fcaa2d963e25dc600master
parent
f18a531f9b
commit
1572e52c19
67
WORKSPACE
67
WORKSPACE
|
@ -15,6 +15,7 @@ http_archive(
|
|||
)
|
||||
|
||||
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
||||
|
||||
protobuf_deps()
|
||||
|
||||
# Force rules_python at a bleeding edge version (for pip3_import).
|
||||
|
@ -31,7 +32,9 @@ http_archive(
|
|||
urls = ["https://github.com/tweag/rules_nixpkgs/archive/dc24090573d74adcf38730422941fd69b87682c7.tar.gz"],
|
||||
sha256 = "aca86baa64174478c57f74ed09d5c2313113abe94aa3af030486d1b14032d3ed",
|
||||
)
|
||||
|
||||
load("//third_party/nix:repository_rules.bzl", "hscloud_setup_nix")
|
||||
|
||||
hscloud_setup_nix(
|
||||
revision = "1179841f9a88b8a548f4b11d1a03aa25a790c379",
|
||||
sha256 = "8b64041bfb9760de9e797c0a985a4830880c21732489f397e217d877edd9a990",
|
||||
|
@ -46,6 +49,7 @@ http_archive(
|
|||
"https://github.com/bazelbuild/rules_go/releases/download/v0.24.7/rules_go-v0.24.7.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "bazel_gazelle",
|
||||
sha256 = "bfd86b3cbe855d6c16c6fce60d76bd51f5c8dbc9cfcaef7a2bb5c1aafd0710e8",
|
||||
|
@ -58,26 +62,30 @@ http_archive(
|
|||
# Python rules
|
||||
# Important: rules_python must be loaded before protobuf (and grpc) because they load an older version otherwise
|
||||
load("@rules_python//python:repositories.bzl", "py_repositories")
|
||||
|
||||
py_repositories()
|
||||
|
||||
load("@rules_python//python:pip.bzl", "pip_repositories")
|
||||
|
||||
pip_repositories()
|
||||
|
||||
load("@hscloud_pip_imports//:imports.bzl", "hscloud_pip3_import")
|
||||
|
||||
hscloud_pip3_import(
|
||||
name = "pydeps",
|
||||
requirements = "//third_party/py:requirements.txt",
|
||||
name = "pydeps",
|
||||
requirements = "//third_party/py:requirements.txt",
|
||||
)
|
||||
|
||||
load("@pydeps//:requirements.bzl", "pip_install")
|
||||
pip_install()
|
||||
|
||||
pip_install()
|
||||
|
||||
# Setup Go toolchain.
|
||||
# This workspace is generated by hscloud_setup_nixpkgs. It will either call
|
||||
# go_register_toolchains() to automagically get Go toolchains from the Internet
|
||||
# or, if nix is present, instead setup a toolchain from nixpkgs.
|
||||
load("@hscloud_go_toolchain//:imports.bzl", "hscloud_go_register_toolchains")
|
||||
|
||||
hscloud_go_register_toolchains()
|
||||
|
||||
# IMPORTANT: match protobuf version above with the one loaded by grpc
|
||||
|
@ -90,19 +98,25 @@ http_archive(
|
|||
|
||||
# Load grpc deps after Go, to prevent overriding Go toolchains/SDK.
|
||||
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
|
||||
|
||||
grpc_deps()
|
||||
|
||||
load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
|
||||
|
||||
grpc_extra_deps()
|
||||
|
||||
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies")
|
||||
|
||||
go_rules_dependencies()
|
||||
|
||||
# gazelle:repository_macro third_party/go/repositories.bzl%go_repositories
|
||||
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
|
||||
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
|
||||
|
||||
gazelle_dependencies()
|
||||
|
||||
# Load Go third-party packages.
|
||||
load("//third_party/go:repositories.bzl", "go_repositories")
|
||||
|
||||
go_repositories()
|
||||
|
||||
# Docker rules
|
||||
|
@ -127,6 +141,7 @@ load(
|
|||
"@io_bazel_rules_docker//repositories:repositories.bzl",
|
||||
container_repositories = "repositories",
|
||||
)
|
||||
|
||||
container_repositories()
|
||||
|
||||
# Docker base images
|
||||
|
@ -151,6 +166,7 @@ container_pull(
|
|||
|
||||
# third_party/factorio
|
||||
load("//third_party/factorio:factorio.bzl", "factorio_repositories")
|
||||
|
||||
factorio_repositories()
|
||||
|
||||
# For devtools/gerrit/gerrit-oauth-provider and gerrit OWNERS plugin
|
||||
|
@ -159,14 +175,17 @@ git_repository(
|
|||
name = "com_googlesource_gerrit_bazlets",
|
||||
remote = "https://gerrit.googlesource.com/bazlets",
|
||||
commit = "1d381f01c853e2c02ae35430a8e294e485635d62",
|
||||
shallow_since = "1559431096 -0400"
|
||||
shallow_since = "1559431096 -0400",
|
||||
)
|
||||
|
||||
load("@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", "gerrit_api")
|
||||
|
||||
gerrit_api()
|
||||
|
||||
load("@com_googlesource_gerrit_bazlets//tools:maven_jar.bzl", gerrit_maven_jar="maven_jar", GERRIT="GERRIT")
|
||||
load("@com_googlesource_gerrit_bazlets//tools:maven_jar.bzl", gerrit_maven_jar = "maven_jar", "GERRIT")
|
||||
|
||||
PROLOG_VERS = "1.4.3"
|
||||
|
||||
JACKSON_VER = "2.9.7"
|
||||
|
||||
gerrit_maven_jar(
|
||||
|
@ -186,21 +205,25 @@ gerrit_maven_jar(
|
|||
artifact = "com.fasterxml.jackson.core:jackson-core:" + JACKSON_VER,
|
||||
sha1 = "4b7f0e0dc527fab032e9800ed231080fdc3ac015",
|
||||
)
|
||||
|
||||
gerrit_maven_jar(
|
||||
name = "jackson-databind",
|
||||
artifact = "com.fasterxml.jackson.core:jackson-databind:" + JACKSON_VER,
|
||||
sha1 = "e6faad47abd3179666e89068485a1b88a195ceb7",
|
||||
)
|
||||
|
||||
gerrit_maven_jar(
|
||||
name = "jackson-annotations",
|
||||
artifact = "com.fasterxml.jackson.core:jackson-annotations:" + JACKSON_VER,
|
||||
sha1 = "4b838e5c4fc17ac02f3293e9a558bb781a51c46d",
|
||||
)
|
||||
|
||||
gerrit_maven_jar(
|
||||
name = "jackson-dataformat-yaml",
|
||||
artifact = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:" + JACKSON_VER,
|
||||
sha1 = "a428edc4bb34a2da98a50eb759c26941d4e85960",
|
||||
)
|
||||
|
||||
gerrit_maven_jar(
|
||||
name = "snakeyaml",
|
||||
artifact = "org.yaml:snakeyaml:1.23",
|
||||
|
@ -214,6 +237,7 @@ gerrit_maven_jar(
|
|||
repository = GERRIT,
|
||||
sha1 = "d5206556cbc76ffeab21313ffc47b586a1efbcbb",
|
||||
)
|
||||
|
||||
gerrit_maven_jar(
|
||||
name = "prolog-compiler",
|
||||
artifact = "com.googlecode.prolog-cafe:prolog-compiler:" + PROLOG_VERS,
|
||||
|
@ -221,6 +245,7 @@ gerrit_maven_jar(
|
|||
repository = GERRIT,
|
||||
sha1 = "f37032cf1dec3e064427745bc59da5a12757a3b2",
|
||||
)
|
||||
|
||||
gerrit_maven_jar(
|
||||
name = "prolog-io",
|
||||
artifact = "com.googlecode.prolog-cafe:prolog-io:" + PROLOG_VERS,
|
||||
|
@ -240,6 +265,7 @@ http_archive(
|
|||
)
|
||||
|
||||
RULES_JVM_EXTERNAL_TAG = "3.0"
|
||||
|
||||
RULES_JVM_EXTERNAL_SHA = "62133c125bf4109dfd9d2af64830208356ce4ef8b165a6ef15bbff7460b35c3a"
|
||||
|
||||
http_archive(
|
||||
|
@ -258,7 +284,7 @@ maven_install(
|
|||
"org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT",
|
||||
"io.grpc:grpc-netty-shaded:1.29.0",
|
||||
"io.grpc:grpc-services:1.29.0",
|
||||
] + IO_GRPC_GRPC_JAVA_ARTIFACTS,
|
||||
] + IO_GRPC_GRPC_JAVA_ARTIFACTS,
|
||||
generate_compat_repositories = True,
|
||||
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
|
||||
repositories = [
|
||||
|
@ -270,12 +296,15 @@ maven_install(
|
|||
)
|
||||
|
||||
load("@maven//:defs.bzl", "pinned_maven_install")
|
||||
|
||||
pinned_maven_install()
|
||||
|
||||
load("@maven//:compat.bzl", "compat_repositories")
|
||||
|
||||
compat_repositories()
|
||||
|
||||
load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
|
||||
|
||||
grpc_java_repositories()
|
||||
|
||||
# Gerrit OWNERS plugins external repositories
|
||||
|
@ -284,12 +313,13 @@ git_repository(
|
|||
name = "com_googlesource_gerrit_plugin_owners",
|
||||
remote = "https://gerrit.googlesource.com/plugins/owners/",
|
||||
commit = "5e691e87b8c00a04d261a8dd313f4d16c54797e8",
|
||||
shallow_since = "1559729722 +0900"
|
||||
shallow_since = "1559729722 +0900",
|
||||
)
|
||||
|
||||
# Go image repos for Docker
|
||||
|
||||
load("@io_bazel_rules_docker//go:image.bzl", go_image_repositories = "repositories")
|
||||
|
||||
go_image_repositories()
|
||||
|
||||
# oniguruma, with build from //third_party/oniguruma
|
||||
|
@ -311,3 +341,24 @@ http_archive(
|
|||
sha256 = "5de8c8e29aaa3fb9cc6b47bb27299f271354ebb72514e3accadc7d38b5bbaa72",
|
||||
build_file = "@hscloud//third_party/jq:BUILD.external",
|
||||
)
|
||||
|
||||
go_repository(
|
||||
name = "com_github_gorilla_sessions",
|
||||
importpath = "github.com/gorilla/sessions",
|
||||
sum = "h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI=",
|
||||
version = "v1.2.1",
|
||||
)
|
||||
|
||||
go_repository(
|
||||
name = "com_github_boltdb_bolt",
|
||||
importpath = "github.com/boltdb/bolt",
|
||||
sum = "h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=",
|
||||
version = "v1.3.1",
|
||||
)
|
||||
|
||||
go_repository(
|
||||
name = "com_github_gorilla_securecookie",
|
||||
importpath = "github.com/gorilla/securecookie",
|
||||
sum = "h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=",
|
||||
version = "v1.1.1",
|
||||
)
|
||||
|
|
|
@ -0,0 +1,301 @@
|
|||
local kube = import "../../../kube/kube.libsonnet";
|
||||
|
||||
{
|
||||
local wow = self,
|
||||
local cfg = wow.cfg,
|
||||
local ns = wow.ns,
|
||||
cfg:: {
|
||||
namespace: error "namespace must be set",
|
||||
prefix: "",
|
||||
images: {
|
||||
acore: "registry.k0.hswaw.net/q3k/azerothcore-wowtlk:1606950998",
|
||||
panel: "registry.k0.hswaw.net/q3k/panel:1607033741-f18a531f9b84c5b33653c8db5d64aaa0af337541",
|
||||
},
|
||||
db: {
|
||||
local mkConfig = function(name) {
|
||||
host: error ("db.%s.host must be set" % [name]),
|
||||
port: error ("db.%s.prt must be set" % [name]),
|
||||
user: error ("db.%s.user must be set" % [name]),
|
||||
password: error ("db.%s.password must be set" % [name]),
|
||||
database: "acore_%s" % [name],
|
||||
},
|
||||
auth: mkConfig("auth"),
|
||||
world: mkConfig("world"),
|
||||
characters: mkConfig("characters"),
|
||||
},
|
||||
panel: {
|
||||
domain: error "panel.domain must be set",
|
||||
soap: {
|
||||
username: error "panel.soap.username must be set",
|
||||
password: error "panel.soap.password must be set",
|
||||
},
|
||||
secret: error "panel.secret must be set",
|
||||
oauth: {
|
||||
clientID: error "panel.oauth.clientID must set",
|
||||
clientSecret: error "panel.oauth.clientSecret must set",
|
||||
redirectURL: "https://%s/callback" % [cfg.panel.domain],
|
||||
},
|
||||
motd: "",
|
||||
},
|
||||
overrides: {
|
||||
authserver: {},
|
||||
worldserver: {},
|
||||
ahbot: {},
|
||||
},
|
||||
},
|
||||
|
||||
ns: kube.Namespace(cfg.namespace),
|
||||
|
||||
data: ns.Contain(kube.PersistentVolumeClaim(cfg.prefix + "data")) {
|
||||
spec+: {
|
||||
storageClassName: "waw-hdd-redundant-3",
|
||||
accessModes: ["ReadWriteOnce"],
|
||||
resources: {
|
||||
requests: {
|
||||
storage: "50Gi",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// Make a *DatabaseInfo string for use by acore config. These are not any real
|
||||
// standardized DSN format, just some semicolon-delimited proprietary format.
|
||||
local mkDbString = function(config) (
|
||||
"%s;%d;%s;%s;%s" % [
|
||||
config.host,
|
||||
config.port,
|
||||
config.user,
|
||||
config.password,
|
||||
config.database,
|
||||
]
|
||||
),
|
||||
|
||||
etc: ns.Contain(kube.Secret(cfg.prefix + "etc")) {
|
||||
data: {
|
||||
"worldserver.conf": std.base64(std.manifestIni({
|
||||
sections: {
|
||||
worldserver: {
|
||||
RealmID: 1,
|
||||
DataDir: "/data/current",
|
||||
LoginDatabaseInfo: mkDbString(cfg.db.auth),
|
||||
WorldDatabaseInfo: mkDbString(cfg.db.world),
|
||||
CharacterDatabaseInfo: mkDbString(cfg.db.characters),
|
||||
LogLevel: 2,
|
||||
|
||||
"Console.Enable": 0,
|
||||
"Ra.Enable": 1,
|
||||
"Ra.IP": "127.0.0.1",
|
||||
"SOAP.Enabled": 1,
|
||||
"SOAP.IP": "0.0.0.0",
|
||||
|
||||
} + cfg.overrides.worldserver,
|
||||
|
||||
},
|
||||
})),
|
||||
"mod_ahbot.conf": std.base64(std.manifestIni({
|
||||
sections: {
|
||||
worldserver: cfg.overrides.ahbot,
|
||||
},
|
||||
})),
|
||||
"authserver.conf": std.base64(std.manifestIni({
|
||||
sections: {
|
||||
authserver: {
|
||||
LoginDatabaseInfo: mkDbString(cfg.db.auth),
|
||||
} + cfg.overrides.authserver,
|
||||
},
|
||||
})),
|
||||
},
|
||||
},
|
||||
|
||||
worldserverDeploy: ns.Contain(kube.Deployment(cfg.prefix + "worldserver")) {
|
||||
spec+: {
|
||||
template+: {
|
||||
spec+: {
|
||||
containers_: {
|
||||
default: kube.Container("default") {
|
||||
image: cfg.images.acore,
|
||||
volumeMounts: [
|
||||
{ name: "data", mountPath: "/data" },
|
||||
{ name: "etc", mountPath: "/azeroth-server/etc/worldserver.conf", subPath: "worldserver.conf", },
|
||||
{ name: "etc", mountPath: "/azeroth-server/etc/mod_ahbot.conf", subPath: "mod_ahbot.conf", },
|
||||
],
|
||||
command: [
|
||||
"/entrypoint.sh",
|
||||
"/azeroth-server/bin/worldserver",
|
||||
],
|
||||
},
|
||||
},
|
||||
securityContext: {
|
||||
runAsUser: 999,
|
||||
runAsGroup: 999,
|
||||
fsGroup: 999,
|
||||
},
|
||||
volumes_: {
|
||||
data: kube.PersistentVolumeClaimVolume(wow.data),
|
||||
etc: kube.SecretVolume(wow.etc),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
authserverDeploy: ns.Contain(kube.Deployment(cfg.prefix + "authserver")) {
|
||||
spec+: {
|
||||
template+: {
|
||||
spec+: {
|
||||
containers_: {
|
||||
default: kube.Container("default") {
|
||||
image: cfg.images.acore,
|
||||
volumeMounts_: {
|
||||
etc: { mountPath: "/azeroth-server/etc/authserver.conf", subPath: "authserver.conf", },
|
||||
},
|
||||
command: [
|
||||
"/azeroth-server/bin/authserver",
|
||||
],
|
||||
},
|
||||
},
|
||||
securityContext: {
|
||||
runAsUser: 999,
|
||||
runAsGroup: 999,
|
||||
},
|
||||
volumes_: {
|
||||
etc: kube.SecretVolume(wow.etc),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
soapSvc: ns.Contain(kube.Service(cfg.prefix + "worldserver-soap")) {
|
||||
target_pod:: wow.worldserverDeploy.spec.template,
|
||||
spec+: {
|
||||
ports: [
|
||||
{ name: "soap", port: 7878, targetPort: 7878, protocol: "TCP" },
|
||||
],
|
||||
},
|
||||
},
|
||||
worldserverSvc: ns.Contain(kube.Service(cfg.prefix + "worldserver")) {
|
||||
target_pod:: wow.worldserverDeploy.spec.template,
|
||||
metadata+: {
|
||||
annotations+: {
|
||||
"metallb.universe.tf/allow-shared-ip": "%s/%ssvc" % [cfg.namespace, cfg.prefix],
|
||||
},
|
||||
},
|
||||
spec+: {
|
||||
ports: [
|
||||
{ name: "worldserver", port: 8085, targetPort: 8085, protocol: "TCP" },
|
||||
],
|
||||
type: "LoadBalancer",
|
||||
externalTrafficPolicy: "Cluster",
|
||||
loadBalancerIP: cfg.address,
|
||||
},
|
||||
},
|
||||
authserverSvc: ns.Contain(kube.Service(cfg.prefix + "authserver")) {
|
||||
target_pod:: wow.authserverDeploy.spec.template,
|
||||
metadata+: {
|
||||
annotations+: {
|
||||
"metallb.universe.tf/allow-shared-ip": "%s/%ssvc" % [cfg.namespace, cfg.prefix],
|
||||
},
|
||||
},
|
||||
spec+: {
|
||||
ports: [
|
||||
{ name: "authserver", port: 3724, targetPort: 3724, protocol: "TCP" },
|
||||
],
|
||||
type: "LoadBalancer",
|
||||
externalTrafficPolicy: "Cluster",
|
||||
loadBalancerIP: cfg.address,
|
||||
},
|
||||
},
|
||||
|
||||
panelSecret: ns.Contain(kube.Secret(cfg.prefix + "panel-secret")) {
|
||||
data+: {
|
||||
soapPassword: std.base64(cfg.panel.soap.password),
|
||||
secret: std.base64(cfg.panel.secret),
|
||||
oauthSecret: std.base64(cfg.panel.oauth.clientSecret),
|
||||
"motd.txt": std.base64(cfg.panel.motd),
|
||||
},
|
||||
},
|
||||
panelData: ns.Contain(kube.PersistentVolumeClaim(cfg.prefix + "panel-data")) {
|
||||
spec+: {
|
||||
storageClassName: "waw-hdd-redundant-3",
|
||||
accessModes: ["ReadWriteOnce"],
|
||||
resources: {
|
||||
requests: {
|
||||
storage: "128Mi",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
panelDeploy: ns.Contain(kube.Deployment(cfg.prefix + "panel")) {
|
||||
spec+: {
|
||||
template+: {
|
||||
spec+: {
|
||||
containers_: {
|
||||
default: kube.Container("default") {
|
||||
image: cfg.images.panel,
|
||||
env_: {
|
||||
SOAP_PASSWORD: kube.SecretKeyRef(wow.panelSecret, "soapPassword"),
|
||||
SECRET: kube.SecretKeyRef(wow.panelSecret, "secret"),
|
||||
OAUTH_SECRET: kube.SecretKeyRef(wow.panelSecret, "oauthSecret"),
|
||||
},
|
||||
command: [
|
||||
"/personal/q3k/wow/panel/panel",
|
||||
"-listen", "0.0.0.0:8080",
|
||||
"-db", "/data/panel.db",
|
||||
"-soap_address", "http://%s" % [wow.soapSvc.host_colon_port],
|
||||
"-soap_password", "$(SOAP_PASSWORD)",
|
||||
"-secret", "$(SECRET)",
|
||||
"-oauth_client_id", cfg.panel.oauth.clientID,
|
||||
"-oauth_client_secret", "$(OAUTH_SECRET)",
|
||||
"-oauth_redirect_url", cfg.panel.oauth.redirectURL,
|
||||
"-motd", "/secret/motd.txt",
|
||||
],
|
||||
volumeMounts_: {
|
||||
data: { mountPath: "/data" },
|
||||
secret: { mountPath: "/secret" },
|
||||
},
|
||||
},
|
||||
},
|
||||
volumes_: {
|
||||
data: kube.PersistentVolumeClaimVolume(wow.panelData),
|
||||
secret: kube.SecretVolume(wow.panelSecret),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
panelSvc: ns.Contain(kube.Service(cfg.prefix + "panel")) {
|
||||
target_pod:: wow.panelDeploy.spec.template,
|
||||
spec+: {
|
||||
ports: [
|
||||
{ name: "web", port: 8080, targetPort: 8080, protocol: "TCP" },
|
||||
],
|
||||
},
|
||||
},
|
||||
panelIngress: ns.Contain(kube.Ingress(cfg.prefix + "panel")) {
|
||||
metadata+: {
|
||||
annotations+: {
|
||||
"kubernetes.io/tls-acme": "true",
|
||||
"certmanager.k8s.io/cluster-issuer": "letsencrypt-prod",
|
||||
},
|
||||
},
|
||||
spec+: {
|
||||
tls: [
|
||||
{
|
||||
hosts: [cfg.panel.domain],
|
||||
secretName: cfg.prefix + "panel-tls",
|
||||
},
|
||||
],
|
||||
rules: [
|
||||
{
|
||||
host: cfg.panel.domain,
|
||||
http: {
|
||||
paths: [
|
||||
{ path: "/", backend: wow.panelSvc.name_port },
|
||||
],
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
|
||||
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_layer", "container_push")
|
||||
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = [
|
||||
"main.go",
|
||||
"soap.go",
|
||||
],
|
||||
importpath = "code.hackerspace.pl/hscloud/personal/q3k/wow/panel",
|
||||
visibility = ["//visibility:private"],
|
||||
deps = [
|
||||
"@com_github_boltdb_bolt//:go_default_library",
|
||||
"@com_github_coreos_go_oidc//:go_default_library",
|
||||
"@com_github_golang_glog//:go_default_library",
|
||||
"@com_github_gorilla_sessions//:go_default_library",
|
||||
"@org_golang_x_oauth2//:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "panel",
|
||||
embed = [":go_default_library"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
container_layer(
|
||||
name = "layer_bin",
|
||||
files = [
|
||||
":panel",
|
||||
],
|
||||
directory = "/personal/q3k/wow/panel/",
|
||||
)
|
||||
|
||||
container_image(
|
||||
name = "runtime",
|
||||
base = "@prodimage-bionic//image",
|
||||
layers = [
|
||||
":layer_bin",
|
||||
],
|
||||
)
|
||||
|
||||
container_push(
|
||||
name = "push",
|
||||
image = ":runtime",
|
||||
format = "Docker",
|
||||
registry = "registry.k0.hswaw.net",
|
||||
repository = "q3k/panel",
|
||||
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
|
||||
)
|
|
@ -0,0 +1,466 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
oidc "github.com/coreos/go-oidc"
|
||||
"github.com/golang/glog"
|
||||
"github.com/gorilla/sessions"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
var (
|
||||
flagSOAPAddress string
|
||||
flagSOAPUsername string
|
||||
flagSOAPPassword string
|
||||
flagListen string
|
||||
flagSecret string
|
||||
flagOAuthClientID string
|
||||
flagOAuthClientSecret string
|
||||
flagOAuthRedirectURL string
|
||||
flagDB string
|
||||
flagMOTD string
|
||||
)
|
||||
|
||||
func init() {
|
||||
flag.Set("logtostderr", "true")
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.StringVar(&flagSOAPAddress, "soap_address", "http://127.0.0.1:7878", "Address of AC SOAP server")
|
||||
flag.StringVar(&flagSOAPUsername, "soap_username", "test1", "SOAP username")
|
||||
flag.StringVar(&flagSOAPPassword, "soap_password", "", "SOAP password")
|
||||
flag.StringVar(&flagListen, "listen", "127.0.0.1:8080", "HTTP listen address")
|
||||
flag.StringVar(&flagSecret, "secret", "", "Cookie secret")
|
||||
flag.StringVar(&flagOAuthClientID, "oauth_client_id", "", "OAuth client ID")
|
||||
flag.StringVar(&flagOAuthClientSecret, "oauth_client_secret", "", "OAuth client secret")
|
||||
flag.StringVar(&flagOAuthRedirectURL, "oauth_redirect_url", "", "OAuth redirect URL")
|
||||
flag.StringVar(&flagDB, "db", "db.db", "Path to database")
|
||||
flag.StringVar(&flagMOTD, "motd", "", "Path to MOTD")
|
||||
flag.Parse()
|
||||
|
||||
if flagSecret == "" {
|
||||
glog.Exitf("-secret must be set")
|
||||
}
|
||||
|
||||
var err error
|
||||
var motd []byte
|
||||
if flagMOTD == "" {
|
||||
glog.Warningf("no MOTD defined, set -motd to get one")
|
||||
} else {
|
||||
motd, err = ioutil.ReadFile(flagMOTD)
|
||||
if err != nil {
|
||||
glog.Exitf("cannot read MOTD %q: %v", flagMOTD, err)
|
||||
}
|
||||
}
|
||||
|
||||
db, err := bolt.Open(flagDB, 0600, nil)
|
||||
if err != nil {
|
||||
glog.Exitf("opening database failed: %v", err)
|
||||
}
|
||||
|
||||
provider, err := oidc.NewProvider(context.Background(), "https://sso.hackerspace.pl")
|
||||
if err != nil {
|
||||
glog.Exitf("newprovider: %v", err)
|
||||
}
|
||||
oauth2Config := oauth2.Config{
|
||||
ClientID: flagOAuthClientID,
|
||||
ClientSecret: flagOAuthClientSecret,
|
||||
RedirectURL: flagOAuthRedirectURL,
|
||||
|
||||
// Discovery returns the OAuth2 endpoints.
|
||||
Endpoint: provider.Endpoint(),
|
||||
|
||||
// "openid" is a required scope for OpenID Connect flows.
|
||||
Scopes: []string{oidc.ScopeOpenID, "profile:read"},
|
||||
}
|
||||
|
||||
err = db.Update(func(tx *bolt.Tx) error {
|
||||
for _, name := range []string{
|
||||
"emailToAccount",
|
||||
} {
|
||||
_, err := tx.CreateBucketIfNotExists([]byte(name))
|
||||
if err != nil {
|
||||
return fmt.Errorf("create bucket %q: %s", name, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
glog.Exitf("db setup failed: %v", err)
|
||||
}
|
||||
|
||||
s := &server{
|
||||
db: db,
|
||||
store: sessions.NewCookieStore([]byte(flagSecret)),
|
||||
oauth2: &oauth2Config,
|
||||
motd: string(motd),
|
||||
}
|
||||
|
||||
http.HandleFunc("/", s.viewIndex)
|
||||
http.HandleFunc("/login", s.viewLogin)
|
||||
http.HandleFunc("/oauth", s.viewOauth)
|
||||
http.HandleFunc("/callback", s.viewOauthCallback)
|
||||
http.HandleFunc("/setup", s.viewOauthSetup)
|
||||
http.HandleFunc("/reset", s.viewReset)
|
||||
http.HandleFunc("/logout", s.viewLogout)
|
||||
|
||||
err = http.ListenAndServe(flagListen, nil)
|
||||
if err != nil {
|
||||
glog.Exitf("ListenAndServe: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
type server struct {
|
||||
db *bolt.DB
|
||||
store *sessions.CookieStore
|
||||
oauth2 *oauth2.Config
|
||||
motd string
|
||||
|
||||
onlineLock sync.RWMutex
|
||||
onlineData []playerinfo
|
||||
onlineDeadline time.Time
|
||||
}
|
||||
|
||||
var (
|
||||
tLogin = template.Must(template.New("login").Parse(`<html>
|
||||
<title>super wow - who are you?</title>
|
||||
<body>
|
||||
<pre>
|
||||
|
||||
___ _ _ _ __ ___ _ __ __ _______ __
|
||||
/ __| | | | '_ \ / _ \ '__| \ \ /\ / / _ \ \ /\ / /
|
||||
\__ \ |_| | |_) | __/ | \ V V / (_) \ V V /
|
||||
|___/\__,_| .__/ \___|_| \_/\_/ \___/ \_/\_/
|
||||
|_|
|
||||
_ _ _ _ _ _
|
||||
| | _____ | | ___ (_)___ _ _ __ | | _____ | |_ _| |__
|
||||
| |/ / _ \| |/ _ \_ / _' | '_ \| |/ / _ \ | | | | | '_ \
|
||||
| < (_) | | __// / (_| | | | | < (_) | | | |_| | |_) |
|
||||
|_|\_\___/|_|\___/___\__,_|_| |_|_|\_\___/ |_|\__,_|_.__/
|
||||
|
||||
_ _ __
|
||||
| | _____ | | ___ __ _ ___ \ \
|
||||
| |/ / _ \| |/ _ \/ _' |/ _ \ (_) |
|
||||
| < (_) | | __/ (_| | (_) | _| |
|
||||
|_|\_\___/|_|\___|\__, |\___/ (_) |
|
||||
|___/ /_/
|
||||
|
||||
</pre>
|
||||
<a href="/oauth">Sign in (or create new account) with HSWAW SSO</a>.<br/>
|
||||
|
||||
<p>
|
||||
Not a hswaw member? Talk to q3k.
|
||||
</p>
|
||||
</body>`))
|
||||
tSetup = template.Must(template.New("setup").Parse(`<html>
|
||||
<title>super wow - setup account</title>
|
||||
<body>
|
||||
<b>hi, please provide details for your new WoW account</b><br/>
|
||||
pick any username you want, pick a 3-16 character password that isn't the same as your sso password (duh)<br />
|
||||
(this isn't your character name, this will only be used to log into WoW)
|
||||
{{ if .Error }}
|
||||
<br /><b>error</b>: {{ .Error }}<br />
|
||||
{{ end }}
|
||||
<form method="post" action="/setup">
|
||||
username:<input name="username" value={{ .Username }}></input><br/>
|
||||
password:<input name="password" type="password"></input><br/>
|
||||
<input type=submit value="create account"/>
|
||||
</form>
|
||||
</body>`))
|
||||
tIndex = template.Must(template.New("index").Parse(`<html>
|
||||
<title>super wow</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #fff;
|
||||
}
|
||||
table, th, td {
|
||||
background-color: #eee;
|
||||
padding: 0.2em 0.4em 0.2em 0.4em;
|
||||
}
|
||||
table th {
|
||||
background-color: #c0c0c0;
|
||||
}
|
||||
table {
|
||||
background-color: #fff;
|
||||
border-spacing: 0.2em;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<b>Hello, {{ .Username }}.</b></br>
|
||||
<a href="/logout">Log out.</a><br />
|
||||
{{ .MOTD }}
|
||||
<p>
|
||||
Your account name is {{ .Username }}. Use the password that you entered when logging in via SSO for the first time, or <form action="/reset" method="POST"><input name="password" type="password" /><input type="submit" value="set a new password"/>.</form>
|
||||
</p>
|
||||
<b>Currently in-game:</b>
|
||||
<table>
|
||||
<tr><th>Account</th><th>Character</th></tr>
|
||||
{{ range .Online }}
|
||||
<tr><td>{{ .Account }}</td><td>{{ .Character }}</td></tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</body>`))
|
||||
)
|
||||
|
||||
func (s *server) session(r *http.Request) *sessions.Session {
|
||||
session, _ := s.store.Get(r, sessionName)
|
||||
return session
|
||||
}
|
||||
|
||||
func (s *server) sessionGet(r *http.Request, k string) string {
|
||||
v, ok := s.session(r).Values[k]
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
v2, ok := v.(string)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
return v2
|
||||
}
|
||||
|
||||
func (s *server) sessionPut(w http.ResponseWriter, r *http.Request, k, v string) {
|
||||
session := s.session(r)
|
||||
session.Values[k] = v
|
||||
session.Save(r, w)
|
||||
}
|
||||
|
||||
func (s *server) online(ctx context.Context) []playerinfo {
|
||||
s.onlineLock.RLock()
|
||||
if s.onlineData == nil || time.Now().After(s.onlineDeadline) {
|
||||
s.onlineLock.RUnlock()
|
||||
s.onlineLock.Lock()
|
||||
data, err := onlinelist(ctx)
|
||||
if err != nil {
|
||||
glog.Errorf("onlinelist fatch failed: %v", err)
|
||||
s.onlineDeadline = time.Now().Add(10 * time.Second)
|
||||
} else {
|
||||
s.onlineData = data
|
||||
s.onlineDeadline = time.Now().Add(60 * time.Second)
|
||||
}
|
||||
s.onlineLock.Unlock()
|
||||
s.onlineLock.RLock()
|
||||
}
|
||||
|
||||
res := make([]playerinfo, len(s.onlineData))
|
||||
for i, pi := range s.onlineData {
|
||||
res[i] = pi
|
||||
}
|
||||
s.onlineLock.RUnlock()
|
||||
return res
|
||||
}
|
||||
|
||||
func (s *server) viewIndex(w http.ResponseWriter, r *http.Request) {
|
||||
account := s.sessionGet(r, "account")
|
||||
if account == "" {
|
||||
http.Redirect(w, r, "/login", 302)
|
||||
return
|
||||
}
|
||||
err := tIndex.Execute(w, map[string]interface{}{
|
||||
"Username": account,
|
||||
"Online": s.online(r.Context()),
|
||||
"MOTD": template.HTML(s.motd),
|
||||
})
|
||||
if err != nil {
|
||||
glog.Errorf("/: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const sessionName = "wow"
|
||||
|
||||
func (s *server) viewLogin(w http.ResponseWriter, r *http.Request) {
|
||||
account := s.sessionGet(r, "account")
|
||||
if account != "" {
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
err := tLogin.Execute(w, nil)
|
||||
if err != nil {
|
||||
glog.Errorf("/login: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func (s *server) viewOauth(w http.ResponseWriter, r *http.Request) {
|
||||
stateBytes := make([]byte, 8)
|
||||
_, err := rand.Read(stateBytes)
|
||||
if err != nil {
|
||||
glog.Errorf("/oauth: random: %v", err)
|
||||
return
|
||||
}
|
||||
state := hex.EncodeToString(stateBytes)
|
||||
s.sessionPut(w, r, "ostate", state)
|
||||
url := s.oauth2.AuthCodeURL(state)
|
||||
http.Redirect(w, r, url, http.StatusTemporaryRedirect)
|
||||
}
|
||||
|
||||
func (s *server) viewOauthCallback(w http.ResponseWriter, r *http.Request) {
|
||||
if r.FormValue("errors") != "" {
|
||||
fmt.Fprintf(w, "Errors: %s", r.FormValue("errors"))
|
||||
return
|
||||
}
|
||||
state := s.sessionGet(r, "ostate")
|
||||
if state == "" {
|
||||
glog.Errorf("No state")
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
if state != r.FormValue("state") {
|
||||
glog.Errorf("Invalid state")
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
oauth2Token, err := s.oauth2.Exchange(r.Context(), r.FormValue("code"))
|
||||
if err != nil {
|
||||
glog.Errorf("Exchange failed: %v", err)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
client := s.oauth2.Client(r.Context(), oauth2Token)
|
||||
res, err := client.Get("https://sso.hackerspace.pl/api/1/userinfo")
|
||||
if err != nil {
|
||||
glog.Errorf("Userinfo failed: %v", err)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
defer res.Body.Close()
|
||||
data, _ := ioutil.ReadAll(res.Body)
|
||||
|
||||
ui := userinfo{}
|
||||
err = json.Unmarshal(data, &ui)
|
||||
if err != nil || ui.Email == "" {
|
||||
glog.Errorf("Userinfo unarshal failed: %v", err)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
|
||||
account, err := s.accountForEmail(ui.Email)
|
||||
if err != nil {
|
||||
glog.Errorf("account get failed: %v", err)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
if account != "" {
|
||||
s.sessionPut(w, r, "account", account)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
} else {
|
||||
s.sessionPut(w, r, "email", ui.Email)
|
||||
http.Redirect(w, r, "/setup", 302)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *server) viewOauthSetup(w http.ResponseWriter, r *http.Request) {
|
||||
email := s.sessionGet(r, "email")
|
||||
if email == "" {
|
||||
glog.Errorf("No email")
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
|
||||
if r.Method == "GET" {
|
||||
tSetup.Execute(w, nil)
|
||||
return
|
||||
}
|
||||
|
||||
username := r.FormValue("username")
|
||||
password := r.FormValue("password")
|
||||
if !reAccount.MatchString(username) {
|
||||
tSetup.Execute(w, map[string]string{
|
||||
"Username": username,
|
||||
"Error": "Invalid username - must be 3-16 a-z 0-9 - _",
|
||||
})
|
||||
return
|
||||
}
|
||||
if !rePassword.MatchString(password) {
|
||||
tSetup.Execute(w, map[string]string{
|
||||
"Username": username,
|
||||
"Error": "Invalid password - must be 3-16 a-z A-Z 0-9 - _",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// this races. ugh. no way to list users. yolo.
|
||||
err := createAccount(r.Context(), username, password)
|
||||
if err != nil {
|
||||
tSetup.Execute(w, map[string]string{
|
||||
"Username": username,
|
||||
"Error": "Account already exists, pick a different username",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
err = s.db.Update(func(tx *bolt.Tx) error {
|
||||
b := tx.Bucket([]byte("emailToAccount"))
|
||||
v := string(b.Get([]byte(email)))
|
||||
if v != "" {
|
||||
s.sessionPut(w, r, "account", v)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return nil
|
||||
}
|
||||
b.Put([]byte(email), []byte(username))
|
||||
s.sessionPut(w, r, "account", username)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
glog.Errorf("setup tx: %v", err)
|
||||
http.Redirect(w, r, "/", 302)
|
||||
}
|
||||
}
|
||||
func (s *server) viewReset(w http.ResponseWriter, r *http.Request) {
|
||||
account := s.sessionGet(r, "account")
|
||||
if account == "" {
|
||||
glog.Errorf("No account")
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
|
||||
password := r.FormValue("password")
|
||||
if !rePassword.MatchString(password) {
|
||||
fmt.Fprintf(w, "pick a 3-16 password with not too many special chars")
|
||||
return
|
||||
}
|
||||
|
||||
// this races. ugh. no way to list users. yolo.
|
||||
err := ensureAccount(r.Context(), account, password)
|
||||
if err != nil {
|
||||
glog.Errorf("ensureAccount(%q, _): %v", account, err)
|
||||
fmt.Fprintf(w, "something went wrong, lol")
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(w, "new password set.")
|
||||
}
|
||||
|
||||
func (s *server) viewLogout(w http.ResponseWriter, r *http.Request) {
|
||||
s.sessionPut(w, r, "account", "")
|
||||
s.sessionPut(w, r, "email", "")
|
||||
http.Redirect(w, r, "/", 302)
|
||||
}
|
||||
|
||||
func (s *server) accountForEmail(email string) (string, error) {
|
||||
res := ""
|
||||
err := s.db.View(func(tx *bolt.Tx) error {
|
||||
b := tx.Bucket([]byte("emailToAccount"))
|
||||
v := b.Get([]byte(email))
|
||||
res = string(v)
|
||||
return nil
|
||||
})
|
||||
return res, err
|
||||
}
|
||||
|
||||
type userinfo struct {
|
||||
Email string `json:"email"`
|
||||
}
|
|
@ -0,0 +1,215 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
type Envelope struct {
|
||||
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
|
||||
Body *Body
|
||||
}
|
||||
|
||||
type Body struct {
|
||||
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
|
||||
Request *Request
|
||||
Response *Response
|
||||
Fault *Fault
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
XMLName xml.Name `xml:"urn:AC executeCommand"`
|
||||
Command string `xml:"command"`
|
||||
}
|
||||
type Response struct {
|
||||
XMLName xml.Name `xml:"urn:AC executeCommandResponse"`
|
||||
Result string `xml:"result"`
|
||||
}
|
||||
|
||||
type Fault struct {
|
||||
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
|
||||
Code string `xml:"faultcode"`
|
||||
String string `xml:"faultstring"`
|
||||
}
|
||||
|
||||
type commandRes struct {
|
||||
result string
|
||||
fault string
|
||||
}
|
||||
|
||||
var (
|
||||
reAccount = regexp.MustCompile(`^[a-z0-9\-_\.]{3,16}$`)
|
||||
rePassword = regexp.MustCompile(`^[a-zA-Z0-9\-_\.]{3,16}$`)
|
||||
)
|
||||
|
||||
func createAccount(ctx context.Context, name, password string) error {
|
||||
if !reAccount.MatchString(name) {
|
||||
return fmt.Errorf("invalid account name")
|
||||
}
|
||||
if !rePassword.MatchString(password) {
|
||||
return fmt.Errorf("invalid password name")
|
||||
}
|
||||
res, err := runCommand(ctx, fmt.Sprintf("account create %s %s", name, password))
|
||||
if err != nil {
|
||||
glog.Errorf("Account create: %v", err)
|
||||
return fmt.Errorf("server unavailable")
|
||||
}
|
||||
if res.result == fmt.Sprintf("Account created: %s", name) {
|
||||
glog.Infof("Created account %q", name)
|
||||
return nil
|
||||
}
|
||||
glog.Errorf("Account create fault: %q/%q", res.fault, res.result)
|
||||
return fmt.Errorf("server error")
|
||||
}
|
||||
|
||||
func ensureAccount(ctx context.Context, name, password string) error {
|
||||
if !reAccount.MatchString(name) {
|
||||
return fmt.Errorf("invalid account name")
|
||||
}
|
||||
if !rePassword.MatchString(password) {
|
||||
return fmt.Errorf("invalid password name")
|
||||
}
|
||||
res, err := runCommand(ctx, fmt.Sprintf("account create %s %s", name, password))
|
||||
if err != nil {
|
||||
glog.Errorf("Account create: %v", err)
|
||||
return fmt.Errorf("server unavailable")
|
||||
}
|
||||
if res.result == fmt.Sprintf("Account created: %s", name) {
|
||||
glog.Infof("Created account %q", name)
|
||||
return nil
|
||||
}
|
||||
if res.fault != "Account with this name already exist!" {
|
||||
glog.Errorf("Account create fault: %q/%q", res.fault, res.result)
|
||||
return fmt.Errorf("server error")
|
||||
}
|
||||
|
||||
res, err = runCommand(ctx, fmt.Sprintf("account set password %s %s %s", name, password, password))
|
||||
if res.result == "The password was changed" {
|
||||
glog.Infof("Updated password for account %q", name)
|
||||
return nil
|
||||
}
|
||||
glog.Infof("password update fault: %q/%q", res.fault, res.result)
|
||||
return fmt.Errorf("server error")
|
||||
}
|
||||
|
||||
func runCommand(ctx context.Context, cmd string) (*commandRes, error) {
|
||||
data, err := xml.Marshal(&Envelope{
|
||||
Body: &Body{
|
||||
Request: &Request{
|
||||
Command: cmd,
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("marshal: %w", err)
|
||||
}
|
||||
buf := bytes.NewBuffer(data)
|
||||
req, err := http.NewRequestWithContext(ctx, "POST", flagSOAPAddress, buf)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("NewRequest(POST, %q): %w", flagSOAPAddress, err)
|
||||
}
|
||||
|
||||
req.SetBasicAuth(flagSOAPUsername, flagSOAPPassword)
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("req.Do: %w", err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
respBytes, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("ReadAll response: %w", err)
|
||||
}
|
||||
|
||||
respEnvelope := Envelope{}
|
||||
err = xml.Unmarshal(respBytes, &respEnvelope)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unmarshal: %w", err)
|
||||
}
|
||||
|
||||
if respEnvelope.Body == nil {
|
||||
return nil, fmt.Errorf("no body returned")
|
||||
}
|
||||
|
||||
if respEnvelope.Body.Fault != nil {
|
||||
fault := respEnvelope.Body.Fault
|
||||
if fault.Code == "SOAP-ENV:Client" {
|
||||
return &commandRes{
|
||||
fault: strings.TrimSpace(fault.String),
|
||||
}, nil
|
||||
}
|
||||
return nil, fmt.Errorf("SOAP error %q: %v", fault.Code, fault.String)
|
||||
}
|
||||
|
||||
result := ""
|
||||
if respEnvelope.Body.Response != nil {
|
||||
result = respEnvelope.Body.Response.Result
|
||||
}
|
||||
|
||||
return &commandRes{
|
||||
result: strings.TrimSpace(result),
|
||||
}, nil
|
||||
}
|
||||
|
||||
type playerinfo struct {
|
||||
Account string
|
||||
Character string
|
||||
}
|
||||
|
||||
func onlinelist(ctx context.Context) ([]playerinfo, error) {
|
||||
res, err := runCommand(ctx, "account onlinelist")
|
||||
if err != nil {
|
||||
glog.Errorf("onlinelist: %v", err)
|
||||
return nil, fmt.Errorf("server unavailable")
|
||||
}
|
||||
if res.fault != "" {
|
||||
glog.Errorf("onlinelist fault: %q", res.fault)
|
||||
return nil, fmt.Errorf("server unavailable")
|
||||
}
|
||||
|
||||
lines := strings.Split(res.result, "\n")
|
||||
header := false
|
||||
var pi []playerinfo
|
||||
for _, line := range lines {
|
||||
switch {
|
||||
case strings.HasPrefix(line, "-="):
|
||||
continue
|
||||
case strings.HasPrefix(line, "-["):
|
||||
default:
|
||||
glog.Warningf("unparseable line %q", line)
|
||||
continue
|
||||
}
|
||||
if !header {
|
||||
header = true
|
||||
continue
|
||||
}
|
||||
if len(line) != 69 {
|
||||
glog.Warningf("wrong line length: %q", line)
|
||||
continue
|
||||
}
|
||||
account := strings.ToLower(strings.TrimSpace(line[2:18]))
|
||||
if line[18:20] != "][" {
|
||||
glog.Warningf("unparseable line %q (wrong sep1)", line)
|
||||
continue
|
||||
}
|
||||
character := strings.TrimSpace(line[20:32])
|
||||
if line[32:34] != "][" {
|
||||
glog.Warningf("unparseable line %q (wrong sep2)", line)
|
||||
continue
|
||||
}
|
||||
pi = append(pi, playerinfo{
|
||||
Account: account,
|
||||
Character: character,
|
||||
})
|
||||
}
|
||||
glog.Infof("Onlinelist: %v", pi)
|
||||
return pi, nil
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
local wow = import "lib.libsonnet";
|
||||
local mysql = import "../../../kube/mysql.libsonnet";
|
||||
|
||||
{
|
||||
q3k: wow {
|
||||
local sqlPassword = (std.split(importstr "secrets/plain/mysql-root-password", "\n"))[0],
|
||||
local soapPassword = (std.split(importstr "secrets/plain/soap-password", "\n"))[0],
|
||||
local panelSecret = (std.split(importstr "secrets/plain/panel-secret", "\n"))[0],
|
||||
local oauthSecret = (std.split(importstr "secrets/plain/oauth-secret", "\n"))[0],
|
||||
local motd = importstr "secrets/plain/motd.txt",
|
||||
|
||||
local wow = self,
|
||||
local cfg = self.cfg,
|
||||
cfg+:: {
|
||||
namespace: "personal-q3k",
|
||||
prefix: "wow-",
|
||||
address: "185.236.240.62",
|
||||
db+: {
|
||||
// Run everything as mysql root, #yolo.
|
||||
local mkConfig = function(name) {
|
||||
host: wow.mysql.svc.host,
|
||||
port: wow.mysql.svc.port,
|
||||
user: "root",
|
||||
password: sqlPassword,
|
||||
database: "acore_%s" % [name],
|
||||
},
|
||||
auth+: mkConfig("auth"),
|
||||
world+: mkConfig("world"),
|
||||
characters+: mkConfig("characters"),
|
||||
},
|
||||
panel+: {
|
||||
domain: "wow.q3k.org",
|
||||
soap+: {
|
||||
username: "test1",
|
||||
password: soapPassword,
|
||||
},
|
||||
secret: panelSecret,
|
||||
oauth+: {
|
||||
clientID: "56403ef3-df6f-4893-b475-d6c18284ed42",
|
||||
clientSecret: oauthSecret,
|
||||
},
|
||||
motd: motd,
|
||||
},
|
||||
overrides+: {
|
||||
worldserver: {
|
||||
RealmZone: 8,
|
||||
Motd: "Welcome to Pabianice. Enjoy your grind.",
|
||||
|
||||
"Rate.Drop.Item.Poor": 2,
|
||||
"Rate.Drop.Item.Normal": 2,
|
||||
"Rate.Drop.Item.Uncommon": 10,
|
||||
"Rate.Drop.Item.Rare": 10,
|
||||
"Rate.Drop.Item.Epic": 10,
|
||||
"Rate.Drop.Item.Legendary": 10,
|
||||
"Rate.Drop.Item.Artifact": 10,
|
||||
"Rate.Drop.Item.Referenced": 10,
|
||||
"Rate.Drop.Money": 10,
|
||||
"Rate.XP.Kill": 5,
|
||||
"Rate.XP.Explore": 5,
|
||||
"Rate.XP.BattlegroundKill": 10,
|
||||
"Rate.MoveSpeed": 2,
|
||||
"SkillGain.Crafting": 5,
|
||||
"SkillGain.Defense": 5,
|
||||
"SkillGain.Gathering": 5,
|
||||
"SkillGain.Weapon": 5,
|
||||
|
||||
"MinPetitionSigns": 5,
|
||||
"GM.AllowFriend": 1,
|
||||
},
|
||||
ahbot: {
|
||||
"AuctionHouseBot.EnableSeller": 1,
|
||||
"AuctionHouseBot.EnableBuyer": 1,
|
||||
"AuctionHouseBot.Account": 21,
|
||||
"AuctionHouseBot.GUID": 12,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// Run a single shitty database.
|
||||
mysql: mysql {
|
||||
cfg+:: {
|
||||
namespace: cfg.namespace,
|
||||
appName: "wow",
|
||||
prefix: cfg.prefix,
|
||||
password: sqlPassword,
|
||||
user: "acore",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQEMAzhuiT4RC8VbAQf6Al2eN0baMX3Yf1uppAH0qTwkrThI1P/sXp9B1C9JfBY8
|
||||
PoIv5OsUC2sGopqJbKF+6jAoNvjUnKcJubUxBFRRYANmmz2QGDWq2Sk5BzimIg89
|
||||
CzdX8gf8p/+oOGbdRKgkJJJw8renZoR6N6yPT0NtesDNAtFHS4gjTVHWhOe7QsTc
|
||||
5xmTd+n9FeFN9Cy5VTcq7DdZ9vYzaF1W6ZbZ3hWSJVlRQTFD4FN9x5IpMO1nVC1s
|
||||
7yhDM0BZFbSdA6ZpLmdJXZUK6P7pyCXNQxzLKgn2Zp8fiKGb/KmR40xjefLYi4Lg
|
||||
19QXMAZmLq7nBgri1CWRYC+4zbNokeqaBDw6xo/Rf4UBDANcG2tp6fXqvgEH/1yZ
|
||||
69hHWddxiZ6IUEH0YoldTVpLcv4Z0tsUTXusuqgw51Bu4uHSbcIC2AiiJmmMspvv
|
||||
irGji4vbrs1phE7JMMDJMhkHp1oPNCk4UL3EgR2kX69CaKE0IWRoT+qIg4nRAnbd
|
||||
BTPdIhHA86fXh5vj2o+UQamYv81v62A43MR4WJenQYeoC9KnCNPh+dWIOVgovqE8
|
||||
iaAviaErXFQyRmyA8/ySyYmbl2uy3CLM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