Conversation
|
I'm only familiar with google cloud, so someone should check this who knows something about aws |
| @@ -0,0 +1,8 @@ | |||
| FROM dtandersen/factorio:latest | |||
|
|
|||
| RUN apk add --update python py-pip | |||
There was a problem hiding this comment.
You should not update any packages if it isn't necessary and you forgot two flags.
I would use apk --no-cache --no-progress add py-pip
There was a problem hiding this comment.
I'm not super familiar with APK (or APT, for that matter) but although there IS an APK awscli package, it's still unreleased (edge?) and I couldn't figure out how to install that instead. Otherwise, the python install of the AWS CLI is the simplest set of steps, even if it does balloon the image size :/
There was a problem hiding this comment.
That is apk from Alpine and not apt from Debian :).
I was more nitpicking about the --update. I think it is fine to use the ``pip`´ variant but if you are interested you can find it here https://pkgs.alpinelinux.org/package/edge/testing/x86_64/aws-cli
| FROM dtandersen/factorio:latest | ||
|
|
||
| RUN apk add --update python py-pip | ||
| RUN pip install awscli |
There was a problem hiding this comment.
Combine those two run commands with && \
| resource "aws_iam_role_policy_attachment" "factorio" { | ||
| role = "${aws_iam_role.factorio.name}" | ||
| policy_arn = "${aws_iam_policy.factorio.arn}" | ||
| } |
There was a problem hiding this comment.
You can remove the empty file from git. :)
|
@fank Terraform also does GCloud, but I'm not familiar with it, so I didn't put that code in. But take a look, because Terraform is amazing. |
|
Yea i know, but never used terraform. But GCloud does not have the ability to run a single container, the smallest thing is a complete k8s cluster. |
|
While not using Fargate, you might want to look at https://github.com/m-chandler/factorio-spot-pricing which uses ECS on Spot via a CloudFormation template. Likely you only want to run a single Factorio container anyway. |
dc642e9 to
0182693
Compare
Hey so I took a swing at making this deployable to AWS Fargate, which is supposed to be the easy host-a-container thing, because I want to be able to turn my computer off without the server going off. Or just because automated the deployment of a game about automation yeeeaaaaah.
Possibly doesn't work, as I had to setup a new AWS account and it looks like it takes time to let me use things like ECS, so I haven't been able to ACTUALLY use it. But everything after this should be "bug fixes", basically. :/
Anyway! It's basically a wrapper script for the existing docker image so that it loads and saves to S3 (Fargate doesn't have persistent storage options) and then "Terraform" configuration to actually setup the cloud infrastructure for hosting.
LMK if this works / what needs changing / etc. :)