Skip to content

Commit 9156702

Browse files
Merge pull request #91 from aws/v0.4.4-releaseArtifacts
v0.4.4 release artifacts
2 parents 6e010f8 + af75018 commit 9156702

File tree

6 files changed

+313
-27
lines changed

6 files changed

+313
-27
lines changed

ATTRIBUTION.txt

Lines changed: 60 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
** cloud.google.com/go/compute/metadata; version v0.93.3 --
33
https://github.com/googleapis/google-cloud-go
44

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

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

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

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

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

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

65-
** github.com/prometheus/common; version v0.26.0 --
65+
** github.com/prometheus/common; version v0.28.0 --
6666
https://github.com/prometheus/common
6767

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

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

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

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

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

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

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

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

101-
** k8s.io/klog/v2; version v2.9.0 --
102-
https://github.com/kubernetes/klog
103-
104-
** k8s.io/kube-openapi/pkg/util/proto; version v0.0.0-20210421082810-95288971da7e --
101+
** k8s.io/kube-openapi/pkg; version v0.0.0-20211115234752-e816edb12b65 --
105102
https://github.com/kubernetes/kube-openapi
106103

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

116-
** sigs.k8s.io/controller-runtime; version v0.10.2 --
113+
** sigs.k8s.io/controller-runtime; version v0.11.1 --
117114
https://github.com/kubernetes-sigs/controller-runtime
118115

119-
** sigs.k8s.io/structured-merge-diff/v4; version v4.1.2 --
116+
** sigs.k8s.io/json; version v0.0.0-20211020170558-c049b76a60c6 --
117+
https://github.com/kubernetes-sigs/json
118+
119+
** sigs.k8s.io/structured-merge-diff/v4; version v4.2.0 --
120120
https://github.com/kubernetes-sigs/structured-merge-diff
121121

122122

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

426426
------
427427

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

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

666666
------
667667

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

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

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

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

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

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

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

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

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

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

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

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

863863
------
864864

865+
** k8s.io/utils/internal/third_party/forked/golang/net; version v0.0.0-20210930125809-cb0fa318a74b --
866+
https://github.com/kubernetes/utils
867+
868+
Copyright (c) 2012 The Go Authors. All rights reserved.
869+
870+
Redistribution and use in source and binary forms, with or without
871+
modification, are permitted provided that the following conditions are
872+
met:
873+
874+
* Redistributions of source code must retain the above copyright
875+
notice, this list of conditions and the following disclaimer.
876+
* Redistributions in binary form must reproduce the above
877+
copyright notice, this list of conditions and the following disclaimer
878+
in the documentation and/or other materials provided with the
879+
distribution.
880+
* Neither the name of Google Inc. nor the names of its
881+
contributors may be used to endorse or promote products derived from
882+
this software without specific prior written permission.
883+
884+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
885+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
886+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
887+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
888+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
889+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
890+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
891+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
892+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
893+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
894+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
895+
896+
------
897+
865898
** github.com/davecgh/go-spew/spew; version v1.1.1 --
866899
https://github.com/davecgh/go-spew
867900

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

906-
** github.com/json-iterator/go; version v1.1.11 --
939+
** github.com/json-iterator/go; version v1.1.12 --
907940
https://github.com/json-iterator/go
908941
Copyright (c) 2016 json-iterator
909942

910-
** github.com/onsi/gomega; version v1.17.0 --
943+
** github.com/onsi/gomega; version v1.19.0 --
911944
https://github.com/onsi/gomega
912945
Copyright (c) 2013-2014 Onsi Fakhouri
913946

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# CloudStack Cluster API Provider (CAPC) Release v.0.4.4 Evaluation Deployment Guide
2+
3+
This document defines a manual deployment process suitable for evaluating this CAPC release.
4+
5+
## Evaluation Environment Pre-Requisites:
6+
7+
### - A running Kubernetes cluster for hosting CAPC
8+
9+
This should be an easily disposable/re-creatable cluster, such as a locally-running kind (Kuberetes in Docker) cluster.
10+
11+
Your KUBECONFIG file's *current-context* must be set to the cluster you want to use.
12+
13+
### - CAPI clusterctl v1.0.1 (https://github.com/kubernetes-sigs/cluster-api/releases/tag/v1.0.1)
14+
15+
This process has been tested with this version of clusterctl. Subsequent 1.0.x versions should work as well.
16+
17+
### - A CloudStack Environment with the following resources defined
18+
- Zone
19+
- Network
20+
- CAPI-compatible QEMU template (i.e., created with https://github.com/kubernetes-sigs/image-builder)
21+
- Machine Offerings (suitable for running Kubernetes nodes)
22+
- apikey and secretkey for a CloudStack user having domain administrative privileges
23+
- Available ACS IP Address for the k8s Control Plane endpoint (Shared network: available IP address in the network range; isolated network: public IP address)
24+
25+
## Deployment Steps
26+
### Define Identity Environment Variable
27+
28+
An environment variable named CLOUDSTACK_B64ENCODED_SECRET must be defined, containing the base64 encoding of a
29+
cloud-config properties file. This file is of the form:
30+
31+
```
32+
[Global]
33+
api-url = <urlOfCloudStackAPI>
34+
api-key = <cloudstackUserApiKey>
35+
secret-key = <cloudstackUserSecretKey>
36+
```
37+
After defining this in a file named cloud-config, create the environment variable with:
38+
39+
```
40+
export CLOUDSTACK_B64ENCODED_SECRET=$(base64 -w0 -i cloud-config 2>/dev/null || base64 -b 0 -i cloud-config)
41+
```
42+
43+
For security, delete this cloud-config file after creating this environment variable.
44+
45+
### Deploy the supplied container image archive (.tar.gz) to a suitable image registry.
46+
47+
*We use https://github.com/kubernetes-sigs/cluster-api/blob/main/hack/kind-install-for-capd.sh to launch a local
48+
docker registry integrated into a kind cluster for lightweight development and testing.*
49+
50+
- On a computer with docker, load the provided cluster-api-provider-capc.tar.gz to docker:
51+
```
52+
docker load --input cluster-api-provider-capc_v0.4.4.tar.gz
53+
```
54+
55+
This will create image *localhost:5000/cluster-api-provider-cloudstack:v0.4.4* in your local docker. This is suitable
56+
for pushing to a local registry.
57+
58+
- (Optional) Tag this image for your registry.
59+
```
60+
docker tag localhost:5000/cluster-api-provider-cloudstack:v0.4.4 <yourRepoFqdn>/cluster-api-provider-cloudstack:v0.4.4
61+
```
62+
63+
Push it to your registry (localhost:5000 if using local registry)
64+
```
65+
docker push <yourRepoFqdn>/cluster-api-provider-cloudstack:v0.4.4
66+
```
67+
68+
### Create clusterctl configuration files
69+
A cluster-api.zip file has been provided, containing the files and directory structure suitable for configuring
70+
clusterctl to work with this interim release of CAPC. It should be restored under $HOME/.cluster-api. It contains:
71+
72+
```
73+
Archive: /Users/jweite/Dev/cluster-api-cloudstack-v0.4.4-assets/cluster-api.zip
74+
* clusterctl.yaml
75+
* dev-repository/
76+
* dev-repository/infrastructure-cloudstack/
77+
* dev-repository/infrastructure-cloudstack/v0.4.4/
78+
* dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template.yaml
79+
* dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template-managed-ssh.yaml
80+
* dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template-ssh-material.yaml
81+
* dev-repository/infrastructure-cloudstack/v0.4.4/infrastructure-components.yaml
82+
* dev-repository/infrastructure-cloudstack/v0.4.4/metadata.yaml
83+
```
84+
85+
*Note: If you already have a $HOME/.cluster-api we strongly suggest you delete or stash it.*
86+
87+
```
88+
cd ~
89+
mkdir .cluster-api
90+
cd .cluster-api
91+
unzip cluster-api.zip
92+
```
93+
94+
### Edit the clusterctl configuration files
95+
- **clusterctl.yaml:** in the *url* attribute replace \<USERID\> with your OS user id to form a valid absolute path to infrastructure-components.yaml.
96+
97+
- **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.
98+
99+
### Deploy CAPI and CAPC to your bootstrap Kubernetes cluster
100+
```
101+
clusterctl init --infrastructure cloudstack
102+
```
103+
104+
### Generate a manifest for the CAPI custom resources needed to allocate a workload cluster.
105+
106+
*Set the below environment variables as appropriate for your CloudStack environment.*
107+
108+
```
109+
CLOUDSTACK_ZONE_NAME=<MyZoneName> \
110+
CLOUDSTACK_NETWORK_NAME=<MyNetworkName> \
111+
CLOUDSTACK_TEMPLATE_NAME=<MyTemplateName> \
112+
CLOUDSTACK_CONTROL_PLANE_MACHINE_OFFERING=<MyServiceOfferingName> \
113+
CONTROL_PLANE_MACHINE_COUNT=1 \
114+
CLOUDSTACK_WORKER_MACHINE_OFFERING=<MyServiceOfferingName> \
115+
WORKER_MACHINE_COUNT=1 \
116+
CLUSTER_ENDPOINT_IP=<AvailableSharedOrPublicIP> \
117+
CLUSTER_ENDPOINT_PORT=6443 \
118+
KUBERNETES_VERSION=<KubernetesVersionOnTheImage> \
119+
CLUSTER_NAME=<MyClusterName> \
120+
clusterctl generate cluster $CLUSTER_NAME --from ~/.cluster-api/dev-repository/infrastructure-cloudstack/v0.4.4/cluster-template.yaml > clusterTemplate.yaml
121+
```
122+
123+
### Review the generated clusterTemplate.yaml and adjust as necessary
124+
125+
126+
### Provision your workload cluster
127+
128+
```
129+
kubectl apply -f clusterTemplate.yaml
130+
```
131+
132+
Provisioning can take several minutes to complete. You will see a control plane VM created in CloudStack pretty quickly,
133+
but it takes a while for it to complete its cloud-init to install Kubernetes and become a functioning control plane.
134+
Allocation of the worker node(s) (with *md* in their VM names) won't occur until the control plane is operational.
135+
136+
You can monitor the CAPC controller as it conducts the provisioning process with:
137+
```
138+
# Get the full name of the CAPC controller pod
139+
kubectl -n capc-system get pods
140+
141+
# Tail its logs
142+
kubectl -n capc-system log -f <CAPCcontrollerPodFullName>
143+
```
144+
145+
### Fetch a kubeconfig to access your cluster
146+
```
147+
clusterctl get kubeconfig <clusterName> > <clusterName>_kubeconfig
148+
```
149+
150+
You can then either export a KUBECONFIG environment variable pointing to this file, or use kubectl's --kubeconfig=<filePath>
151+
flag.
152+
```
153+
export KUBECONFIG=<clusterName>_kubeconfig
154+
```
155+
156+
### Examine the provisioned Kubernetes Cluster's nodes
157+
```
158+
kubectl get nodes
159+
```
160+
Expect to see a control plane and a worker node reported by Kubernetes. Neither will report that they are ready
161+
because no CNI is installed yet.
162+
163+
### Install Cilium CNI
164+
```
165+
cilium install
166+
```
167+
The above command presumes that the cilium installer is present on the local workstation.
168+
169+
It will take a minute while it waits for cilium to become active.
170+
171+
### Confirm that Cluster is Ready for Work
172+
```
173+
kubectl get nodes
174+
```
175+
Expect now to see both nodes list as ready.
176+
177+
### Conclusion
178+
At this point the workload cluster is ready to accept workloads. Use it in the usual way via the kubeconfig generated
179+
earlier
180+
181+
### Cluster Deletion
182+
As mentioned in the preface, CAPC is not yet able to delete workload cluster. To do so manually we recommend
183+
simply tearing-down the kind bootstrap cluster, and then manually deleting the CloudStack VMs created for it
184+
using the CloudStack UI, API or similar facilities.

0 commit comments

Comments
 (0)