Inital commit
This commit is contained in:
commit
ed142d9308
|
@ -0,0 +1,27 @@
|
|||
|
||||
# Before running "make", check the instructions in the readme
|
||||
|
||||
# binaries
|
||||
pp=luajit tools/etluapp/etluapp.lua # preprocessor
|
||||
|
||||
startup_code=$(wildcard src/startup/*.sh.etlua) # startup files that need to be run through the preprocessor
|
||||
startup_built=$(startup_code:src/startup/%.etlua=build/startup/%) # the files after preprocessing
|
||||
srcs=$(wildcard src/*.etlua) # other files to run through the preprocessor
|
||||
built=$(srcs:src/%.etlua=build/%) # other files after preprocessing
|
||||
|
||||
ready=$(built) $(startup_built)
|
||||
|
||||
all: $(ready)
|
||||
echo "Ready: $(startup_built)"
|
||||
cd build && terraform init && terraform apply
|
||||
|
||||
$(built): build/% : src/%.etlua config.lua secrets.lua
|
||||
cat $< | $(pp) > $@
|
||||
|
||||
$(startup_built) : build/startup/% : src/startup/%.etlua config.lua secrets.lua
|
||||
cat $< | $(pp) > $@
|
||||
|
||||
build/init.tf : config.lua
|
||||
|
||||
clean:
|
||||
rm $(startup_built) $(built)
|
|
@ -0,0 +1,55 @@
|
|||
-- Configuration!
|
||||
-- Change this stuff
|
||||
|
||||
|
||||
-- Bits of config
|
||||
local config = {
|
||||
aws_region="us-west-2",
|
||||
domain = "txwea.boo",
|
||||
subdomain_fmt = "%s.txwea.boo",
|
||||
version="0.0.1",
|
||||
}
|
||||
|
||||
-- These scripts spin up
|
||||
-- each vps gets a name, and each vps gets some services. Each services may
|
||||
-- depend on other services in a directed acyclic graph.
|
||||
|
||||
config.services = {
|
||||
mc = {-- The minecraft server
|
||||
ports = {25565},
|
||||
public = true,
|
||||
},
|
||||
laminar = { -- A laminar ci/cd server
|
||||
ports = {8080},
|
||||
},
|
||||
web = {-- Web server hosts the mmc instance, the map, ect.
|
||||
ports = {80, 443},
|
||||
public = true,
|
||||
},
|
||||
ssh = { -- The ssh server into the vpc, so you can bounce to other boxes that may not open ssh directly
|
||||
ports = {22},
|
||||
public = true,
|
||||
},
|
||||
}
|
||||
-- Configure services -> machines
|
||||
config.machines = {
|
||||
main = {
|
||||
services = {"mc","laminar","web","ssh"},
|
||||
size = "t3.nano"
|
||||
},
|
||||
}
|
||||
config.mods = {
|
||||
shared = {},
|
||||
server = {},
|
||||
client = {},
|
||||
}
|
||||
|
||||
-- Validation! Don't change stuff below this line!
|
||||
|
||||
for _,mod in pairs(config.mods.shared) do
|
||||
table.insert(config.mods.client,mod)
|
||||
table.insert(config.mods.server,mod)
|
||||
end
|
||||
|
||||
|
||||
return config
|
|
@ -0,0 +1,6 @@
|
|||
local secrets = {
|
||||
access_key = "<your access key here>"
|
||||
secret_key = "<your secret key here>"
|
||||
}
|
||||
|
||||
return secrets
|
|
@ -0,0 +1,5 @@
|
|||
local etlua = require("etlua")
|
||||
|
||||
local input = io.read("*a")
|
||||
local template = assert(etlua.compile(input))
|
||||
io.write(template({}))
|
Loading…
Reference in New Issue