Skip to content

Commit

Permalink
Merge pull request kubernetes#30744 from madhusudancs/fed-split-build…
Browse files Browse the repository at this point in the history
…-to-develop-deploy

Automatic merge from submit-queue

Separate federation build.sh into development and deployment scripts.

The idea behind this separation is that it provides a clear distinction
between the dev environment and the prod environment. The
deploy/deploy.sh script will be shipped to the users, but
develop/develop.sh will be purely for development purposes and won't
be part of a release distribution.

Purely for developer convenience, all the deployment functionality is
made available through the develop/develop.sh script.

This change also copies deploy/* files into the release distribution.

cc @kubernetes/sig-cluster-federation @colhom 

```release-note
Federation can now be deployed using the `federation/deploy/deploy.sh` script. This script does not depend on any of the development environment shell library/scripts. This is an alternative to the current `federation-up.sh`/`federation-down.sh` scripts. Both the scripts are going to co-exist in this release, but the `federation-up.sh`/`federation-down.sh` scripts might be removed in a future release in favor of `federation/deploy/deploy.sh` script.
```
  • Loading branch information
Kubernetes Submit Queue authored Aug 29, 2016
2 parents 033e473 + a39f8ed commit 09a9720
Show file tree
Hide file tree
Showing 7 changed files with 399 additions and 241 deletions.
3 changes: 2 additions & 1 deletion build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,11 @@ function kube::release::package_full_tarball() {
mkdir -p "${release_stage}/third_party"
cp -R "${KUBE_ROOT}/third_party/htpasswd" "${release_stage}/third_party/htpasswd"

# Include only federation/cluster and federation/manifests
# Include only federation/cluster, federation/manifests and federation/deploy
mkdir "${release_stage}/federation"
cp -R "${KUBE_ROOT}/federation/cluster" "${release_stage}/federation/"
cp -R "${KUBE_ROOT}/federation/manifests" "${release_stage}/federation/"
cp -R "${KUBE_ROOT}/federation/deploy" "${release_stage}/federation/"

cp -R "${KUBE_ROOT}/examples" "${release_stage}/"
cp -R "${KUBE_ROOT}/docs" "${release_stage}/"
Expand Down
37 changes: 26 additions & 11 deletions federation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,42 @@ as explained in that guide, you also need to install [`jq`](https://stedolan.git
which this workflow depends, so we are giving an exception to jq
for now. -->

Building cluster federation should be as simple as running:
Building cluster federation artifacts should be as simple as running:

```shell
make build do=gen
make build
```

To deploy clusters and install federation components, edit the
`config.default.json` file to describe your clusters and run
You can specify the docker registry to tag the image using the
KUBE_REGISTRY environment variable. Please make sure that you use
the same value in all the subsequent commands.

To push the built docker images to the registry, run:

```shell
make push
```

To initialize the deployment run:

(This pull the installer images)

```shell
make build do=deploy
make init
```

To deploy the clusters and install the federation components, edit the
`${KUBE_ROOT}/_output/federation/config.json` file to describe your
clusters and run:

```shell
make deploy
```

To turn down the federation components and tear down the clusters run:

```shell
make build do=destroy
make destroy
```

# Ideas for improvement
Expand All @@ -53,11 +72,7 @@ make build do=destroy
12. `destroy`: destroy-federation + destroy-clusters
13. `redeploy-federation`: just redeploys the federation components.

2. Add a `release` phase to run as part of Kubernetes release process
that copies only a part of the `build.sh` script that's relevant to
the users into the release.

3. Continue with `destroy` phase even in the face of errors.
2. Continue with `destroy` phase even in the face of errors.

The bash script sets `set -e errexit` which causes the script to exit
at the very first error. This should be the default mode for deploying
Expand Down
217 changes: 0 additions & 217 deletions federation/build.sh

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 09a9720

Please sign in to comment.