Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML packaging #101

Closed
cyriltovena opened this issue Feb 22, 2018 · 19 comments
Closed

YAML packaging #101

cyriltovena opened this issue Feb 22, 2018 · 19 comments
Assignees
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/design Proposal discussing new features / fixes and how they should be implemented
Milestone

Comments

@cyriltovena
Copy link
Collaborator

cyriltovena commented Feb 22, 2018

Looking at the big install.yaml file and all the configurations possible, I think it would help people to provide a way of packaging YAML files.

Possible variables:

  • namespace
  • service account names
  • MIN_PORT
  • MAX_PORT
  • images version (for later)
  • RBAC on/off ???

The default variable should reflect the current install.yaml.

We should also update the documentation to add installation step using helm on top of what we already have.

I don't think it's urgent for 0.1 but interesting to have.

/cc @rodcloutier

@cyriltovena cyriltovena added area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/examples Examples. Usually found in the `examples` directory area/community Pertaining to the community - i.e. slack, mailing list, etc and removed area/community Pertaining to the community - i.e. slack, mailing list, etc labels Feb 22, 2018
@markmandel
Copy link
Member

So I wonder if this should be made a broader discussion -

  • Do we use Helm
  • Do we use Ksonnet
  • Do we create our own thing?

Each one has it's own pros and cons.

Totally agree on the size of the install.yaml - it's starting to get unwieldy, and I keeping the two versions in sync is getting painful as well, and potentially prone to error.

Top of mind concerns for me:

  • Having some kind of template system that will do variable substitution.
  • Having some kind of template system that does includes (so we can break up the install.yaml)
  • Some kind of scripting ability would be nice - mainly because of webhooks we store some certs and the public key in install.yaml. For production these should be unique to an install, so likely generated one time and able to be rotated via a script.

We should likely make a list of the features we are looking for in an install solution, and see what the best fitting tool is going to be.

Thoughts?

@cyriltovena
Copy link
Collaborator Author

I have no preferences, as far as it cover all your concerns it's fine by me.

@cyriltovena cyriltovena changed the title Helm package YAML packaging Feb 22, 2018
@markmandel
Copy link
Member

Sounds fair enough. Probably another concern would be how it handles upgrades of installs in a sensible way.

Sounds like time to start a spreadsheet and do some research!

@markmandel markmandel added help wanted We would love help on these issues. Please come help us! good first issue These are great first issues. If you are looking for a place to start, start here! kind/design Proposal discussing new features / fixes and how they should be implemented area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc and removed area/examples Examples. Usually found in the `examples` directory labels Feb 22, 2018
@markmandel
Copy link
Member

markmandel commented Feb 25, 2018

Regarding "roll your own" one option I was considering was a agonesadm binary (for win/lin/mac) that would be use local Kube credentials to install Agones on a cluster, and would be bundled with the release archives. Would have both a:

agonesadm install - installs Agones
agonesadm yaml - output the yaml for installation, if you want to do it manually

And it could then have a variety of flags for configuring various options, which would work across install and yaml.

I thought this was kind of interesting, as then the Go code could generate the self signed ssl certs within it, as well as do the installation steps.

Not sure if this is reinventing the wheel, but thought I'd throw the idea out there, and see if it stuck.

This is how helm does it:
https://docs.helm.sh/using_helm/#installing-helm

@markmandel markmandel added this to the 0.2 milestone Feb 28, 2018
@markmandel
Copy link
Member

More research:
Here is how Istio handles the certs for the mutating webhook:
https://istio.io/docs/setup/kubernetes/sidecar-injection.html#installing-the-webhook

Not pretty, but it is a solution.

@cyriltovena
Copy link
Collaborator Author

cyriltovena commented Mar 14, 2018

interesting plugin https://github.com/SUSE/helm-certgen

@markmandel
Copy link
Member

Chat from today.
TL;DR - We will go with Helm.

Mark Mandel [1:12 PM]
@Cyril Tovena chatting about Helm - quick thought - if we wanted to do a quick spike, to see what a helm chart for Agones looked like - easy/hard ?


Rod Cloutier [1:12 PM]
Would be fairly easy for us to do.

Mark Mandel [1:12 PM]
Sounds like that may be a nice way forward? Just to try it out, see how it feels?
especially if it will handle the certs issues
and installing helm doesn't look particularly onerous

Rod Cloutier [1:13 PM]
We don`t need to use Helm on both the client and server side. You can generate a yaml from Helm charts and do a `kubectl apply` afterward.

Mark Mandel [1:13 PM]
OH REALLY?
this is why I ask you smart people the questions :smile:
I did not know this
Sounds like Helm is a winner winner chicken dinner?

Cyril Tovena [1:15 PM]
like I said you could try to even get a stable chart
which is good for visibility
I suggest that I give a go with helm without certs and move from there

Mark Mandel [1:17 PM]
SGTM
I'll copy paste this little chat into the ticket, just for posterity/transparency

@cyriltovena
Copy link
Collaborator Author

while reading the doc I found that you can run post installation test : https://docs.helm.sh/developing_charts/#chart-tests

That's just awesome, I'm thinking to use flag switch in the controller container to run a simple gs/pod creation and release control.

WDYT ? I'm planing to introduce this after a first version so probably create a new issue if we all think that's a boomer.

@markmandel
Copy link
Member

We do have a need for #37 (End to end tests) - so maybe this helps with both tickets!

@rodcloutier
Copy link

Just be careful with this as you now need to install tiller in the cluster to make your tests. This is nice to use a sanity check for the user but I would probably not use this as end to end tests.

@markmandel
Copy link
Member

But wouldn't we need to install tiller anyway, so we could install Agones, so we could do end to end tests? 😃

@markmandel
Copy link
Member

The other thought I had, if there is a way, is that there is a light test for end users, and then there's the full test for the actual e2e tests - if that is possible.

@cyriltovena
Copy link
Collaborator Author

we can do a full test for the user using this ! (create a gs, wait for it to have a pod assigned, communicate)

I'm having hard time with end to end tests are really for us ? is it in an actual cluster ?

@markmandel
Copy link
Member

I'm having hard time with end to end tests are really for us ? is it in an actual cluster ?
Apologies, I'm not following?

So one thing I'm very much thinking - we do want automated testing of the Helm chart as well as e2e tests.

So this is likely more a conversation for #37 - but part of that would be to install via helm, and then make sure things work. But we could defer the testing work until we have a valid Helm install.

This actually makes me even more happy about using Helm for this work - it has lots of useful tools!

@cyriltovena
Copy link
Collaborator Author

Sorry midnight comment, but yes I was asking about the scope of e2e tests.

@fooock
Copy link
Contributor

fooock commented Apr 3, 2018

To see the full scope of this feature take a look to this comment

Work breakdown

  • Create a Helm chart that can be installed and used on a cluster + docs (see Helm integration #149)
  • Migrate build/ tooling to use Helm
  • Write Helm test (details to be discussed)
  • Chart repository
  • Update release process

@markmandel
Copy link
Member

@fooock we'll want to add a work item of adding the ability to list namespaces that the gameservers will run in, and create service accounts for them - see #146 and #154 for context.

@markmandel
Copy link
Member

I'm currently working on migrating the build tooling to use helm over here, which involves getting it ready for 0.2.

Soon, no more sed!

markmandel added a commit to markmandel/agones that referenced this issue Apr 9, 2018
This removes the `sed` based templating and replaces it with a
helm based workflow. All the `make` commands have stayed exactly
the same.

If you have an existing development cluster, it may be easiest
to delete them and recreate them, as the tooling will install
helm automatically now on cluster creation.

I also snuck in some small Kubernetes 1.9.x upgrades as well.

Parent ticket: googleforgames#101
markmandel added a commit to markmandel/agones that referenced this issue Apr 9, 2018
This removes the `sed` based templating and replaces it with a
helm based workflow. All the `make` commands have stayed exactly
the same.

This also moves the existing 0.1 release helm chat to the 0.2
development chart, and includes the features that were otherwise
missing for 0.2

If you have an existing development cluster, it may be easiest
to delete them and recreate them, as the tooling will install
helm automatically now on cluster creation.

I also snuck in some small Kubernetes 1.9.x upgrades as well.

Parent ticket: googleforgames#101
markmandel added a commit to markmandel/agones that referenced this issue Apr 9, 2018
This implements a `make gen-install` target that will generate the
install.yaml via `helm template`. This also extends `make test`
to have a test to ensure that the `install.yaml` is always kept
up to sync with the Helm chart, otehrwise the build will fail.

This does remove the explicit permissions for RBAC, but we don't
have a specific need for them right now, so I feel it's worth the
sacrifice to ensure these two configuration options stay in sync.

Blocks on googleforgames#170, Parent ticket: googleforgames#101
markmandel added a commit to markmandel/agones that referenced this issue Apr 10, 2018
This implements a `make gen-install` target that will generate the
install.yaml via `helm template`. This also extends `make test`
to have a test to ensure that the `install.yaml` is always kept
up to sync with the Helm chart, otehrwise the build will fail.

This does remove the explicit permissions for RBAC, but we don't
have a specific need for them right now, so I feel it's worth the
sacrifice to ensure these two configuration options stay in sync.

Blocks on googleforgames#170, Parent ticket: googleforgames#101
markmandel added a commit to markmandel/agones that referenced this issue Apr 10, 2018
This implements a `make gen-install` target that will generate the
install.yaml via `helm template`. This also extends `make test`
to have a test to ensure that the `install.yaml` is always kept
up to sync with the Helm chart, otehrwise the build will fail.

This does remove the explicit permissions for RBAC, but we don't
have a specific need for them right now, so I feel it's worth the
sacrifice to ensure these two configuration options stay in sync.

Blocks on googleforgames#170, Parent ticket: googleforgames#101
markmandel added a commit to markmandel/agones that referenced this issue Apr 10, 2018
This implements a `make gen-install` target that will generate the
install.yaml via `helm template`. This also extends `make test`
to have a test to ensure that the `install.yaml` is always kept
up to sync with the Helm chart, otehrwise the build will fail.

This does remove the explicit permissions for RBAC, but we don't
have a specific need for them right now, so I feel it's worth the
sacrifice to ensure these two configuration options stay in sync.

Blocks on googleforgames#170, Parent ticket: googleforgames#101
markmandel added a commit to markmandel/agones that referenced this issue Apr 10, 2018
This implements a `make gen-install` target that will generate the
install.yaml via `helm template`. This also extends `make test`
to have a test to ensure that the `install.yaml` is always kept
up to sync with the Helm chart, otehrwise the build will fail.

This does remove the explicit permissions for RBAC, but we don't
have a specific need for them right now, so I feel it's worth the
sacrifice to ensure these two configuration options stay in sync.

Blocks on googleforgames#170, Parent ticket: googleforgames#101
@markmandel markmandel modified the milestones: 0.2.0, 0.3.0 May 30, 2018
@markmandel markmandel modified the milestones: 0.3.0, 0.4.0 Jul 17, 2018
@cyriltovena
Copy link
Collaborator Author

Every remaining work has it's own issue, let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/design Proposal discussing new features / fixes and how they should be implemented
Projects
None yet
Development

No branches or pull requests

4 participants