blob: e89985974c30a3717e1fe5690aa7394d618b5c8d [file] [log] [blame]
Sergiusz Bazanskicb5c3212019-05-19 03:10:17 +02001local factorio = import "factorio.libsonnet";
Serge Bazanskic684ca92021-06-12 22:02:25 +00002local proxy = import "proxy.libsonnet";
Serge Bazanskie7f4cc12021-06-12 21:55:40 +00003local kube = import "../../../kube/kube.libsonnet";
Sergiusz Bazanskicb5c3212019-05-19 03:10:17 +02004
Serge Bazanskie7f4cc12021-06-12 21:55:40 +00005// This deploys factorio instances and the modproxy in the `factorio`
6// Kubernetes namespace.
7//
8// Available factorio versions:
Serge Bazanski791ab6d2020-08-14 10:34:29 +00009// - 1.0.0-1
Dariusz Niemczykb3799c82021-06-12 23:02:58 +020010// - 1.1.34-1
Serge Bazanskif7efc402021-06-18 19:30:21 +000011// - 1.1.35-1
ironbounde7c85092021-12-26 00:04:26 +000012// - 1.1.50-1
Serge Bazanskie7f4cc12021-06-12 21:55:40 +000013// See: //third_party/factorio.
Sergiusz Bazanskicb5c3212019-05-19 03:10:17 +020014
15{
16 local prod = self,
17
radex99ed6a72023-11-24 11:42:55 +010018 local ns = kube.Namespace("factorio"),
Serge Bazanskic684ca92021-06-12 22:02:25 +000019
20 // instance makes a factorio server with a given name and at a
21 // given tag/version.
Sergiusz Bazanskicb5c3212019-05-19 03:10:17 +020022 instance(name, tag):: factorio {
23 cfg+: {
24 namespace: "factorio",
25 prefix: name + "-",
26 tag: tag,
27 }
28 },
29
Serge Bazanskic684ca92021-06-12 22:02:25 +000030 proxy: proxy {
31 cfg+: {
32 namespace: "factorio",
Sergiusz Bazanski0581bbf2020-05-11 03:21:32 +020033 },
34 },
35
36 local mod = function(name, version) { name: name, version: version },
ironbounde7c85092021-12-26 00:04:26 +000037 pymods: prod.instance("pymods", "1.1.50-1") {
Dariusz Niemczykb3799c82021-06-12 23:02:58 +020038 cfg+: {
Serge Bazanski99b10bb2021-06-21 14:05:34 +000039 // Bump up to 2G/2CPU request/limit.
40 resources: {
41 requests: {
42 cpu: "2",
43 memory: "2Gi",
44 },
45 limits: self.requests,
46 },
Dariusz Niemczykb3799c82021-06-12 23:02:58 +020047 mods: [
48 // Stdlib for mods
49 mod("stdlib", "1.4.6"),
50 // General QOL
51 // Better loaders
52 mod("LoaderRedux", "1.7.1"),
53 mod("LoaderReduxForFactorioExtendedPlus", "1.1.0"),
54 // Trains
55 mod("traintunnels", "0.0.11"),
56 mod("FARL", "4.1.2"),
57 // Move between buildings
58 mod("Squeak Through", "1.8.2"),
59 // Requirements calculator
60 mod("helmod", "0.12.5"),
61 // Compact loaders for easier and faster transportation
62 mod("deadlock-beltboxes-loaders", "2.4.2"),
63 // Better inserters
64 mod("bobinserters", "1.1.0"),
65 // Teleport to tags for easier movement with huge server
66 mod("TagToTeleport", "1.1.1"),
67 // Necessary for PYmods to get proper list of ingredients for the next step
68 mod("what-is-it-really-used-for", "1.6.0"),
69 // Resource monitor
70 mod("YARM", "0.8.203"),
71 // YEET
72 mod("RenaiTransportation", "0.8.6"),
73
74 // PYmods
75 mod("pypetroleumhandling", "2.0.6"),
76 mod("pyrawores", "2.2.7"),
77 mod("pyraworesgraphics", "1.0.9"),
78 mod("pycoalprocessing", "1.9.3"),
79 mod("pycoalprocessinggraphics", "1.0.9"),
80 // Resource overhaul
Dariusz Niemczykba0fd862021-06-13 23:45:56 +020081 mod("rso-mod", "6.2.6"),
82 // mciancia
83 mod("Warehousing", "0.5.2"),
84 mod("AbandonedRuins", "1.1.4"),
85 mod("Factorissimo2", "2.5.2"),
Dariusz Niemczykb3799c82021-06-12 23:02:58 +020086 ],
87 },
88 },
Sergiusz Bazanskicb5c3212019-05-19 03:10:17 +020089}