Skip to content

Commit

Permalink
Merge pull request #91 from aws/v0.4.4-releaseArtifacts
Browse files Browse the repository at this point in the history
v0.4.4 release artifacts
  • Loading branch information
jweite-amazon authored May 13, 2022
2 parents 6e010f8 + af75018 commit 9156702
Show file tree
Hide file tree
Showing 6 changed files with 313 additions and 27 deletions.
87 changes: 60 additions & 27 deletions ATTRIBUTION.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
** cloud.google.com/go/compute/metadata; version v0.93.3 --
https://github.com/googleapis/google-cloud-go

** github.com/apache/cloudstack-go/v2/cloudstack; version v2.11.1-0.20211020121644-369057554f66 --
** github.com/apache/cloudstack-go/v2/cloudstack; version v2.13.0 --
https://github.com/apache/cloudstack-go/v2

** github.com/Azure/go-autorest/autorest; version v0.11.18 --
Expand All @@ -29,7 +29,7 @@ https://github.com/coredns/corefile-migration
** github.com/docker/distribution; version v2.7.1+incompatible --
https://github.com/distribution/distribution

** github.com/go-logr/logr; version v0.4.0 --
** github.com/go-logr/logr; version v1.2.3 --
https://github.com/go-logr/logr

** github.com/golang/groupcache/lru; version v0.0.0-20210331224755-41bb18bfe9da --
Expand All @@ -50,7 +50,7 @@ https://github.com/matttproud/golang_protobuf_extensions
** github.com/modern-go/concurrent; version v0.0.0-20180306012644-bacd9c7ef1dd --
https://github.com/modern-go/concurrent

** github.com/modern-go/reflect2; version v1.0.1 --
** github.com/modern-go/reflect2; version v1.0.2 --
https://github.com/modern-go/reflect2

** github.com/opencontainers/go-digest; version v1.0.0 --
Expand All @@ -62,7 +62,7 @@ https://github.com/prometheus/client_golang
** github.com/prometheus/client_model/go; version v0.2.0 --
https://github.com/prometheus/client_model

** github.com/prometheus/common; version v0.26.0 --
** github.com/prometheus/common; version v0.28.0 --
https://github.com/prometheus/common

** github.com/prometheus/procfs; version v0.6.0 --
Expand All @@ -77,31 +77,28 @@ https://gopkg.in/ini.v1
** gopkg.in/yaml.v2; version v2.4.0 --
https://gopkg.in/yaml.v2

** k8s.io/api; version v0.22.2 --
** k8s.io/api; version v0.23.0 --
https://github.com/kubernetes/api

** k8s.io/apiextensions-apiserver/pkg/apis/apiextensions; version v0.22.2 --
** k8s.io/apiextensions-apiserver/pkg/apis/apiextensions; version v0.23.0 --
https://github.com/kubernetes/apiextensions-apiserver

** k8s.io/apimachinery/pkg; version v0.22.2 --
** k8s.io/apimachinery/pkg; version v0.23.0 --
https://github.com/kubernetes/apimachinery

** k8s.io/client-go; version v0.22.2 --
** k8s.io/client-go; version v0.23.0 --
https://github.com/kubernetes/client-go

** k8s.io/cluster-bootstrap/token; version v0.22.2 --
https://github.com/kubernetes/cluster-bootstrap

** k8s.io/component-base; version v0.22.2 --
** k8s.io/component-base; version v0.23.0 --
https://github.com/kubernetes/component-base

** k8s.io/klog; version v1.0.0 --
** k8s.io/klog/v2; version v2.30.0 --
https://github.com/kubernetes/klog

** k8s.io/klog/v2; version v2.9.0 --
https://github.com/kubernetes/klog

** k8s.io/kube-openapi/pkg/util/proto; version v0.0.0-20210421082810-95288971da7e --
** k8s.io/kube-openapi/pkg; version v0.0.0-20211115234752-e816edb12b65 --
https://github.com/kubernetes/kube-openapi

** k8s.io/utils; version v0.0.0-20210930125809-cb0fa318a74b --
Expand All @@ -113,10 +110,13 @@ https://github.com/kubernetes-sigs/cluster-api
** sigs.k8s.io/cluster-api; version v1.0.0 --
https://github.com/kubernetes-sigs/cluster-api

** sigs.k8s.io/controller-runtime; version v0.10.2 --
** sigs.k8s.io/controller-runtime; version v0.11.1 --
https://github.com/kubernetes-sigs/controller-runtime

** sigs.k8s.io/structured-merge-diff/v4; version v4.1.2 --
** sigs.k8s.io/json; version v0.0.0-20211020170558-c049b76a60c6 --
https://github.com/kubernetes-sigs/json

** sigs.k8s.io/structured-merge-diff/v4; version v4.2.0 --
https://github.com/kubernetes-sigs/structured-merge-diff


Expand Down Expand Up @@ -425,7 +425,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

------

** github.com/evanphx/json-patch; version v4.11.0+incompatible --
** github.com/evanphx/json-patch; version v4.12.0+incompatible --
https://github.com/evanphx/json-patch

Copyright (c) 2014, Evan Phoenix
Expand Down Expand Up @@ -665,7 +665,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

------

** github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg; version v0.26.0 --
** github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg; version v0.28.0 --
https://github.com/prometheus/common

Copyright (c) 2011, Open Knowledge Foundation Ltd.
Expand Down Expand Up @@ -738,31 +738,31 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
** golang.org/go; version go1.16 --
https://github.com/golang/go

** golang.org/x/crypto/pkcs12; version v0.0.0-20210817164053-32db794688a5 --
** golang.org/x/crypto/pkcs12; version v0.0.0-20210921155107-089bfa567519 --
https://go.googlesource.com/crypto

** golang.org/x/net; version v0.0.0-20210520170846-37e1c6afe023 --
** golang.org/x/net; version v0.0.0-20220225172249-27dd8689420f --
https://go.googlesource.com/net

** golang.org/x/oauth2; version v0.0.0-20210819190943-2bc19b11175f --
https://go.googlesource.com/oauth2

** golang.org/x/sys; version v0.0.0-20210823070655-63515b42dcdf --
** golang.org/x/sys; version v0.0.0-20220319134239-a9b59b0215f8 --
https://go.googlesource.com/sys

** golang.org/x/term; version v0.0.0-20210220032956-6a3ed077a48d --
** golang.org/x/term; version v0.0.0-20210927222741-03fcf44c2211 --
https://go.googlesource.com/term

** golang.org/x/text; version v0.3.6 --
** golang.org/x/text; version v0.3.7 --
https://go.googlesource.com/text

** golang.org/x/time/rate; version v0.0.0-20210723032227-1f47c861a9ac --
https://go.googlesource.com/time

** k8s.io/apimachinery/third_party/forked/golang; version v0.22.2 --
** k8s.io/apimachinery/third_party/forked/golang; version v0.23.0 --
https://github.com/kubernetes/apimachinery

** k8s.io/client-go/third_party/forked/golang/template; version v0.22.2 --
** k8s.io/client-go/third_party/forked/golang/template; version v0.23.0 --
https://github.com/kubernetes/client-go

Copyright (c) 2009 The Go Authors. All rights reserved.
Expand Down Expand Up @@ -862,6 +862,39 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

------

** k8s.io/utils/internal/third_party/forked/golang/net; version v0.0.0-20210930125809-cb0fa318a74b --
https://github.com/kubernetes/utils

Copyright (c) 2012 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

------

** github.com/davecgh/go-spew/spew; version v1.1.1 --
https://github.com/davecgh/go-spew

Expand Down Expand Up @@ -903,11 +936,11 @@ Copyright (c) 2012 Dave Grijalva
https://github.com/gobuffalo/flect
Copyright (c) 2019 Mark Bates

** github.com/json-iterator/go; version v1.1.11 --
** github.com/json-iterator/go; version v1.1.12 --
https://github.com/json-iterator/go
Copyright (c) 2016 json-iterator

** github.com/onsi/gomega; version v1.17.0 --
** github.com/onsi/gomega; version v1.19.0 --
https://github.com/onsi/gomega
Copyright (c) 2013-2014 Onsi Fakhouri

Expand Down
184 changes: 184 additions & 0 deletions releases/v0.4.4/EVALUATION_DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# CloudStack Cluster API Provider (CAPC) Release v.0.4.4 Evaluation Deployment Guide

This document defines a manual deployment process suitable for evaluating this CAPC release.

## Evaluation Environment Pre-Requisites:

### - A running Kubernetes cluster for hosting CAPC

This should be an easily disposable/re-creatable cluster, such as a locally-running kind (Kuberetes in Docker) cluster.

Your KUBECONFIG file's *current-context* must be set to the cluster you want to use.

### - CAPI clusterctl v1.0.1 (https://github.com/kubernetes-sigs/cluster-api/releases/tag/v1.0.1)

This process has been tested with this version of clusterctl. Subsequent 1.0.x versions should work as well.

### - A CloudStack Environment with the following resources defined
- Zone
- Network
- CAPI-compatible QEMU template (i.e., created with https://github.com/kubernetes-sigs/image-builder)
- Machine Offerings (suitable for running Kubernetes nodes)
- apikey and secretkey for a CloudStack user having domain administrative privileges
- Available ACS IP Address for the k8s Control Plane endpoint (Shared network: available IP address in the network range; isolated network: public IP address)

## Deployment Steps
### Define Identity Environment Variable

An environment variable named CLOUDSTACK_B64ENCODED_SECRET must be defined, containing the base64 encoding of a
cloud-config properties file. This file is of the form:

```
[Global]
api-url = <urlOfCloudStackAPI>
api-key = <cloudstackUserApiKey>
secret-key = <cloudstackUserSecretKey>
```
After defining this in a file named cloud-config, create the environment variable with:

```
export CLOUDSTACK_B64ENCODED_SECRET=$(base64 -w0 -i cloud-config 2>/dev/null || base64 -b 0 -i cloud-config)
```

For security, delete this cloud-config file after creating this environment variable.

### Deploy the supplied container image archive (.tar.gz) to a suitable image registry.

*We use https://github.com/kubernetes-sigs/cluster-api/blob/main/hack/kind-install-for-capd.sh to launch a local
docker registry integrated into a kind cluster for lightweight development and testing.*

- On a computer with docker, load the provided cluster-api-provider-capc.tar.gz to docker:
```
docker load --input cluster-api-provider-capc_v0.4.4.tar.gz
```

This will create image *localhost:5000/cluster-api-provider-cloudstack:v0.4.4* in your local docker. This is suitable
for pushing to a local registry.

- (Optional) Tag this image for your registry.
```
docker tag localhost:5000/cluster-api-provider-cloudstack:v0.4.4 <yourRepoFqdn>/cluster-api-provider-cloudstack:v0.4.4
```

Push it to your registry (localhost:5000 if using local registry)
```
docker push <yourRepoFqdn>/cluster-api-provider-cloudstack:v0.4.4
```

### Create clusterctl configuration files
A cluster-api.zip file has been provided, containing the files and directory structure suitable for configuring
clusterctl to work with this interim release of CAPC. It should be restored under $HOME/.cluster-api. It contains:

```
Archive: /Users/jweite/Dev/cluster-api-cloudstack-v0.4.4-assets/cluster-api.zip
* clusterctl.yaml
* dev-repository/
* dev-repository/infrastructure-cloudstack/
* dev-repository/infrastructure-cloudstack/v0.4.4/
* dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template.yaml
* dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template-managed-ssh.yaml
* dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template-ssh-material.yaml
* dev-repository/infrastructure-cloudstack/v0.4.4/infrastructure-components.yaml
* dev-repository/infrastructure-cloudstack/v0.4.4/metadata.yaml
```

*Note: If you already have a $HOME/.cluster-api we strongly suggest you delete or stash it.*

```
cd ~
mkdir .cluster-api
cd .cluster-api
unzip cluster-api.zip
```

### Edit the clusterctl configuration files
- **clusterctl.yaml:** in the *url* attribute replace \<USERID\> with your OS user id to form a valid absolute path to infrastructure-components.yaml.

- **dev-repository/infrastructure-cloudstack/v0.4.4/infrastructure-components.yaml:** if you're not using a local registry modify the capc-controller-manager deployment, changing the spec.template.spec.containers[0].image (line 617) to correctly reflect your container registry.

### Deploy CAPI and CAPC to your bootstrap Kubernetes cluster
```
clusterctl init --infrastructure cloudstack
```

### Generate a manifest for the CAPI custom resources needed to allocate a workload cluster.

*Set the below environment variables as appropriate for your CloudStack environment.*

```
CLOUDSTACK_ZONE_NAME=<MyZoneName> \
CLOUDSTACK_NETWORK_NAME=<MyNetworkName> \
CLOUDSTACK_TEMPLATE_NAME=<MyTemplateName> \
CLOUDSTACK_CONTROL_PLANE_MACHINE_OFFERING=<MyServiceOfferingName> \
CONTROL_PLANE_MACHINE_COUNT=1 \
CLOUDSTACK_WORKER_MACHINE_OFFERING=<MyServiceOfferingName> \
WORKER_MACHINE_COUNT=1 \
CLUSTER_ENDPOINT_IP=<AvailableSharedOrPublicIP> \
CLUSTER_ENDPOINT_PORT=6443 \
KUBERNETES_VERSION=<KubernetesVersionOnTheImage> \
CLUSTER_NAME=<MyClusterName> \
clusterctl generate cluster $CLUSTER_NAME --from ~/.cluster-api/dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template.yaml > clusterTemplate.yaml
```

### Review the generated clusterTemplate.yaml and adjust as necessary


### Provision your workload cluster

```
kubectl apply -f clusterTemplate.yaml
```

Provisioning can take several minutes to complete. You will see a control plane VM created in CloudStack pretty quickly,
but it takes a while for it to complete its cloud-init to install Kubernetes and become a functioning control plane.
Allocation of the worker node(s) (with *md* in their VM names) won't occur until the control plane is operational.

You can monitor the CAPC controller as it conducts the provisioning process with:
```
# Get the full name of the CAPC controller pod
kubectl -n capc-system get pods
# Tail its logs
kubectl -n capc-system log -f <CAPCcontrollerPodFullName>
```

### Fetch a kubeconfig to access your cluster
```
clusterctl get kubeconfig <clusterName> > <clusterName>_kubeconfig
```

You can then either export a KUBECONFIG environment variable pointing to this file, or use kubectl's --kubeconfig=<filePath>
flag.
```
export KUBECONFIG=<clusterName>_kubeconfig
```

### Examine the provisioned Kubernetes Cluster's nodes
```
kubectl get nodes
```
Expect to see a control plane and a worker node reported by Kubernetes. Neither will report that they are ready
because no CNI is installed yet.

### Install Cilium CNI
```
cilium install
```
The above command presumes that the cilium installer is present on the local workstation.

It will take a minute while it waits for cilium to become active.

### Confirm that Cluster is Ready for Work
```
kubectl get nodes
```
Expect now to see both nodes list as ready.

### Conclusion
At this point the workload cluster is ready to accept workloads. Use it in the usual way via the kubeconfig generated
earlier

### Cluster Deletion
As mentioned in the preface, CAPC is not yet able to delete workload cluster. To do so manually we recommend
simply tearing-down the kind bootstrap cluster, and then manually deleting the CloudStack VMs created for it
using the CloudStack UI, API or similar facilities.
Loading

0 comments on commit 9156702

Please sign in to comment.