Skip to content

Commit

Permalink
add push to do-release target and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril TOVENA authored and markmandel committed Sep 21, 2018
1 parent e9d267d commit 43d7abd
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 12 deletions.
28 changes: 28 additions & 0 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ KUBECONFIG ?= ~/.kube/config
# The (gcloud) test cluster that is being worked against
GCP_CLUSTER_NAME ?= test-cluster
GCP_CLUSTER_ZONE ?= us-west1-c
GCP_BUCKET_CHARTS ?= agones-chart
# the profile to use when developing on minikube
MINIKUBE_PROFILE ?= agones

Expand Down Expand Up @@ -108,6 +109,31 @@ build: build-images build-sdks
# build the docker images
build-images: build-controller-image build-agones-sdk-image

# package the current agones helm chart
build-chart: RELEASE_VERSION ?= $(base_version)
build-chart: CHART_DIR ?= install/helm/agones/
build-chart: $(ensure-build-image)
docker run --rm $(common_mounts) -w $(mount_path) $(build_tag) bash -c \
"mkdir -p install/helm/bin/ && rm -rf install/helm/bin/* && \
helm init --client-only && helm package -d install/helm/bin/ --version $(RELEASE_VERSION) $(CHART_DIR)"

# push the current chart to google cloud storage and update the index
push-chart: $(ensure-build-image) build-chart
docker run --rm $(common_mounts) -w $(mount_path) $(build_tag) bash -c \
"gsutil copy gs://$(GCP_BUCKET_CHARTS)/index.yaml ./install/helm/bin/index.yaml || /bin/true && \
helm repo index --merge ./install/helm/bin/index.yaml ./install/helm/bin && \
cat ./install/helm/bin/index.yaml && ls ./install/helm/bin/ && \
gsutil copy ./install/helm/bin/*.* gs://$(GCP_BUCKET_CHARTS)/"

# push a specific release useful to push previous missing release
push-release-chart: RELEASE_VERSION ?= $(base_version)
push-release-chart: $(ensure-build-image)
rm -rf /tmp/agones $(agones_path)/install/.helm-$(RELEASE_VERSION)/
mkdir -p $(agones_path)/install/.helm-$(RELEASE_VERSION)/
cd /tmp && git clone --single-branch -b release-$(RELEASE_VERSION) git@github.com:GoogleCloudPlatform/agones.git
mv /tmp/agones/install/helm/agones $(agones_path)/install/.helm-$(RELEASE_VERSION)/
CHART_DIR=install/.helm-$(RELEASE_VERSION)/agones $(MAKE) push-chart

#build all the sdks
build-sdks: build-sdk-cpp

Expand Down Expand Up @@ -277,6 +303,7 @@ gen-changelog:
# - Build binaries and images
# - Creates sdk and binary archives, and moves the into the /release folder for upload
# - Creates a zip of the install.yaml, LICENCE and README.md for installation
# - Pushes the current chart version to the helm repository hosted on gcs.
do-release: RELEASE_VERSION ?= $(base_version)
do-release:
@echo "Starting release for version: $(RELEASE_VERSION)"
Expand All @@ -291,6 +318,7 @@ do-release:
cp $(agones_path)/sdks/cpp/bin/agonessdk-$(RELEASE_VERSION)-dev-linux-arch_64.tar.gz $(agones_path)/release
cp $(agones_path)/sdks/cpp/bin/agonessdk-$(RELEASE_VERSION)-src.zip $(agones_path)/release
cd $(agones_path) && zip -r ./release/agones-install-$(RELEASE_VERSION).zip ./README.md ./install ./LICENSE
$(MAKE) push-chart
$(MAKE) gcloud-auth-docker push VERSION=$(RELEASE_VERSION)
git push -u upstream release-$(RELEASE_VERSION)
@echo "Now go make the $(RELEASE_VERSION) release on Github!"
Expand Down
7 changes: 7 additions & 0 deletions docs/governance/templates/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ See [CHANGELOG](https://github.com/GoogleCloudPlatform/agones/blob/{release-bran
This software is currently alpha, and subject to change. Not to be used in production systems.

Images available with this release:

- [gcr.io/agones-images/agones-controller:{version}](https://gcr.io/agones-images/agones-controller:{version})
- [gcr.io/agones-images/agones-sdk:{version}](https://gcr.io/agones-images/agones-sdk:{version})
- [gcr.io/agones-images/cpp-simple-server:{example-version}](https://gcr.io/agones-images/cpp-simple-server:{example-version})
- [gcr.io/agones-images/udp-server:{example-version}](https://gcr.io/agones-images/udp-server:{example-version})
- [gcr.io/agones-images/xonotic-example:{example-version}](https://gcr.io/agones-images/xonotic-example:{example-version})

Helm chart available with this release:

- [`helm install agones/agones --version {example-version}](https://agones.dev/chart/stable/agones-{example-version}.tgz)

> Make sure to add our stable helm repository using `helm repo add https://agones.dev/chart/stable`
3 changes: 2 additions & 1 deletion docs/governance/templates/release_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ and copy it into a release issue. Fill in relevent values, found inside {}
- [ ] Create PR with these changes, and merge them with approval
- [ ] Confirm local git remote `upstream` points at `git@github.com:GoogleCloudPlatform/agones.git`
- [ ] Run `git checkout master && git reset --hard upstream/master` to ensure your code is in line with upstream (unless this is a hotfix, then do the same, but for the the release branch)
- [ ] Run `make do-release`. (if release candidate `make do-release RELEASE_VERSION={version}.rc`) to create and push the docker images.
- [ ] Run `make do-release`. (if release candidate `make do-release RELEASE_VERSION={version}.rc`) to create and push the docker images and helm chart.
- [ ] Do a `helm repo add agones https://agones.dev/chart/stable` and verify that the new version is available via the command `helm search agones/`
- [ ] Do a `helm install` and a smoke test to confirm everything is working.
- [ ] Create a release with the [release template][release-template]
- [ ] Make a `tag` with the release version.
Expand Down
18 changes: 7 additions & 11 deletions install/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ This chart install the Agones application and defines deployment on a [Kubernete

> If you don't have `Helm` installed locally, or `Tiller` installed in your Kubernetes cluster, read the [Using Helm](https://docs.helm.sh/using_helm/) documentation to get started.
To install the chart with the release name `my-release`:

Download the latest `agones-install` zip from the [releases](https://github.com/GoogleCloudPlatform/agones/releases) archive.
To install the chart with the release name `my-release` using our stable helm repository:

```bash
$ wget https://github.com/GoogleCloudPlatform/agones/releases/download/v0.4.0/agones-install-0.4.0.zip
$ unzip agones-install-0.4.0.zip
$ cd install/helm/
$ helm install --name my-release --namespace agones-system agones
$ helm repo add agones https://agones.dev/chart/stable
$ helm install --name my-release --namespace agones-system agones/agones
```

_We recommend to install Agones in its own namespaces (like `agones-system` as shown above)
Expand All @@ -30,7 +26,7 @@ you can use the helm `--namespace` parameter to specify a different namespace._
The command deploys Agones on the Kubernetes cluster with the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

> **Tip**: List all releases using `helm list`
>

> If you are installing a development build of Agones (i.e. not the 0.4.0 release), you will need to install Agones the following way:
Expand All @@ -51,7 +47,7 @@ For example to use `default` **and** `xbox` namespaces:

```bash
$ kubectl create namespace xbox
$ helm install --set "gameservers.namespaces={default,xbox}" --namespace agones-system --name my-release agones
$ helm install --set "gameservers.namespaces={default,xbox}" --namespace agones-system --name my-release agones/agones
```

> You need to create your namespaces before installing Agones.
Expand All @@ -60,7 +56,7 @@ If you want to add a new namespace afterward simply upgrade your release:

```bash
$ kubectl create namespace ps4
$ helm upgrade --set "gameservers.namespaces={default,xbox,ps4}" my-release agones
$ helm upgrade --set "gameservers.namespaces={default,xbox,ps4}" my-release agones/agones
```

## RBAC
Expand Down Expand Up @@ -120,7 +116,7 @@ The above command sets the namespace where Agones is deployed to `mynamespace`.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
$ helm install --name my-release --namespace agones-system -f values.yaml agones
$ helm install --name my-release --namespace agones-system -f values.yaml agones/agones
```

> **Tip**: You can use the default [values.yaml](agones/values.yaml)
Expand Down

0 comments on commit 43d7abd

Please sign in to comment.