Skip to content

Commit

Permalink
Add Kubernetes to the release script
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdee committed Dec 4, 2015
1 parent 75bb00f commit a5aec5a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/kubernetes/AWSIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ This guide will walk you through how to use Calico Networking with an existing A
## Installing Calico
On each of your AWS Instances, you will need to download and install the `calicoctl` binary
```
wget https://github.com/projectcalico/calico-docker/releases/download/v0.9.0/calicoctl
wget http://www.projectcalico.org/builds/calicoctl
chmod +x calicoctl
sudo mv calicoctl /usr/bin/
```

## Configuring the Master
On your master, you will need to setup an etcd instance specifically for Calico. To do so, you will need to download our etcd manifest
```
wget https://raw.githubusercontent.com/projectcalico/calico-kubernetes/master/config/master/calico-etcd.manifest
wget https://raw.githubusercontent.com/projectcalico/calico-kubernetes/v0.6.0/config/master/calico-etcd.manifest
```

Replace all instances of `<PRIVATE_IPV4>` with your master's IP. Then, place the manifest file in the `/etc/kubernetes/manifests/` directory.
Expand All @@ -39,7 +39,7 @@ After a short delay, the kubelet on your master will automatically create a cont

Next, use `calicoctl` to spin up the `calico/node` container and install the Calico [network plugin](https://github.com/projectcalico/calico-kubernetes) for Kubernetes.
```
sudo ETCD_AUTHORITY=<MASTER_IPV4>:6666 calicoctl node --kubernetes --kube-plugin-version=v0.4.0
sudo ETCD_AUTHORITY=<MASTER_IPV4>:6666 calicoctl node --kubernetes
```

Then you will need to set up an IP pool with IP-in-IP enabled. This is a [necessary step](../FAQ.md#can-i-run-calico-in-a-public-cloud-environment) in any public cloud environment.
Expand Down Expand Up @@ -75,7 +75,7 @@ Hold on to this token, as you will need it to configure your nodes.
## Configuring the Nodes
On each node, use `calicoctl` to spin up the `calico/node` container and install the Calico [network plugin](https://github.com/projectcalico/calico-kubernetes) for Kubernetes.
```
sudo ETCD_AUTHORITY=<MASTER_IPV4>:6666 calicoctl node --kubernetes --kube-plugin-version=v0.4.0
sudo ETCD_AUTHORITY=<MASTER_IPV4>:6666 calicoctl node --kubernetes
```

To start using the Calico network plugin, we will need to modify the existing kubelet process on each of your nodes.
Expand Down
4 changes: 2 additions & 2 deletions docs/kubernetes/KubernetesIntegration.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ wget http://www.projectcalico.org/latest/calicoctl
sudo chmod +x calicoctl
# Run the calico/node container
sudo ETCD_AUTHORITY=<ETCD_IP>:<ETCD_PORT> ./calicoctl node --kubernetes --kube-plugin-version=v0.6.1
sudo ETCD_AUTHORITY=<ETCD_IP>:<ETCD_PORT> ./calicoctl node --kubernetes
```
> In the above commands, the `--kubernetes` option installs the `calico-kubernetes` plugin at the given version.
> In the above commands, the `--kubernetes` option installs the `calico-kubernetes` plugin.
#### 2. Configure the Network Plugin
The Calico network plugin for Kubernetes uses the `calico_kubernetes.ini` file to read in user configuration.
Expand Down
21 changes: 18 additions & 3 deletions release-scripts/do_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""do_release.py
Usage:
do_release.py [--force] [--dry-run] [CALICO_DOCKER_VERSION CALICO_VERSION LIBCALICO_VERSION LIBNETWORK_VERSION]
do_release.py [--force] [--dry-run] [CALICO_DOCKER_VERSION CALICO_VERSION LIBCALICO_VERSION LIBNETWORK_VERSION KUBERNETES_VERSION]
Options:
-h --help Show this screen.
Expand All @@ -22,6 +22,7 @@
from calico_ctl import __libnetwork_plugin_version__
from calico_ctl import __libcalico_version__
from calico_ctl import __felix_version__
from calico_ctl import __kubernetes_plugin_version__


# The candidate version replacement performs most of the required version
Expand All @@ -41,6 +42,12 @@
(re.compile(r'__felix_version__\s*=\s*".*"'),
'__felix_version__ = "{calico-version}"'),

(re.compile(r'__kubernetes_plugin_version__\s*=\s*".*"'),
'__kubernetes_plugin_version__ = "{kubernetes-version}"'),

(re.compile(r'raw.githubusercontent.com/projectcalico/calico-kubernetes/[^\/]+/'),
'raw.githubusercontent.com/projectcalico/calico-kubernetes/{kubernetes-version}/'),

(re.compile(r'\*\*release\*\*'),
'{version}'),

Expand Down Expand Up @@ -120,8 +127,10 @@ def start_release():
calico_version = arguments["CALICO_VERSION"]
libcalico_version = arguments["LIBCALICO_VERSION"]
libnetwork_version = arguments["LIBNETWORK_VERSION"]
kubernetes_version = arguments["KUBERNETES_VERSION"]

if not (calico_version and libcalico_version and libnetwork_version):

if not (calico_version and libcalico_version and libnetwork_version and kubernetes_version):
para("To pin the calico libraries used by calico-docker, please specify "
"the name of the requested versions as they appear in the GitHub "
"releases.")
Expand All @@ -136,11 +145,17 @@ def start_release():
utils.get_github_library_version("libnetwork-plugin", __libnetwork_plugin_version__,
"https://github.com/projectcalico/libnetwork-plugin")

kubernetes_version = \
utils.get_github_library_version("kubernetes-plugin", __kubernetes_plugin_version__,
"https://github.com/projectcalico/calico-kubernetes")

release_data["versions"] = {"version": new_version,
"version-no-v": new_version[1:],
"calico-version": calico_version,
"libcalico-version": libcalico_version,
"libnetwork-version": libnetwork_version}
"libnetwork-version": libnetwork_version,
"kubernetes-version": kubernetes_version,
}

bullet("Creating a candidate release branch called "
"'%s-candidate'." % new_version)
Expand Down

0 comments on commit a5aec5a

Please sign in to comment.