Skip to content

Commit

Permalink
Removed terraform actuators (kubernetes-sigs#126)
Browse files Browse the repository at this point in the history
Removed the terraform actuator code.  Removed the terraform install in the
Dockerfile.  Updated all the code to remove MachineVariables.  This
actuator is no longer being maintain and slowly falling behind the govmomi
actuators.

Resolves kubernetes-sigs#125
  • Loading branch information
Loc Nguyen authored and k8s-ci-robot committed Nov 26, 2018
1 parent 43899d6 commit e4135d6
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 1,562 deletions.
42 changes: 1 addition & 41 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager sigs.k8s.io/clu
FROM debian:stretch-slim
WORKDIR /root/

### BEGIN Legacy directives for the terraform variant
ENV TERRAFORM_VERSION=0.11.7
ENV TERRAFORM_ZIP=terraform_${TERRAFORM_VERSION}_linux_amd64.zip
ENV TERRAFORM_SHA256SUM=6b8ce67647a59b2a3f70199c304abca0ddec0e49fd060944c26f666298e23418
ENV TERRAFORM_SHAFILE=terraform_${TERRAFORM_VERSION}_SHA256SUMS

RUN apt-get update && apt-get install -y ca-certificates curl openssh-server unzip && \
curl https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/${TERRAFORM_ZIP} > ${TERRAFORM_ZIP} && \
echo "${TERRAFORM_SHA256SUM} ${TERRAFORM_ZIP}" > ${TERRAFORM_SHAFILE} && \
sha256sum --quiet -c ${TERRAFORM_SHAFILE} && \
unzip ${TERRAFORM_ZIP} -d /bin && \
rm -f ${TERRAFORM_ZIP} ${TERRAFORM_SHAFILE} && \
rm -rf /var/lib/apt/lists/*

# Setup template provider
ENV TEMPLATE_PROVIDER_VERSION=1.0.0
ENV TEMPLATE_PROVIDER_ZIP=terraform-provider-template_${TEMPLATE_PROVIDER_VERSION}_linux_amd64.zip
ENV TEMPLATE_PROVIDER_SHA256SUM=f54c2764bd4d4c62c1c769681206dde7aa94b64b814a43cb05680f1ec8911977
ENV TEMPLATE_PROVIDER_SHAFILE=terraform-provider-template_${TEMPLATE_PROVIDER_VERSION}_SHA256SUMS

RUN curl https://releases.hashicorp.com/terraform-provider-template/${TEMPLATE_PROVIDER_VERSION}/${TEMPLATE_PROVIDER_ZIP} > ${TEMPLATE_PROVIDER_ZIP} && \
echo "${TEMPLATE_PROVIDER_SHA256SUM} ${TEMPLATE_PROVIDER_ZIP}" > ${TEMPLATE_PROVIDER_SHAFILE} && \
sha256sum --quiet -c ${TEMPLATE_PROVIDER_SHAFILE} && \
mkdir -p ~/.terraform.d/plugins/linux_amd64/ && \
unzip ${TEMPLATE_PROVIDER_ZIP} -d ~/.terraform.d/plugins/linux_amd64/ && \
rm -f ${TEMPLATE_PROVIDER_ZIP} ${TEMPLATE_PROVIDER_SHAFILE}

# Setup vsphere provider
ENV VSPHERE_PROVIDER_VERSION=1.5.0
ENV VSPHERE_PROVIDER_ZIP=terraform-provider-vsphere_${VSPHERE_PROVIDER_VERSION}_linux_amd64.zip
ENV VSPHERE_PROVIDER_SHA256SUM=6dd495feeb83aa8b098d4e9b0224b9e18b758153504449ff4ac2c6510ed4bb52
ENV VSPHERE_PROVIDER_SHAFILE=terraform-provider-vsphere_${VSPHERE_PROVIDER_VERSION}_SHA256SUMS

RUN curl https://releases.hashicorp.com/terraform-provider-vsphere/${VSPHERE_PROVIDER_VERSION}/${VSPHERE_PROVIDER_ZIP} > ${VSPHERE_PROVIDER_ZIP} && \
echo "${VSPHERE_PROVIDER_SHA256SUM} ${VSPHERE_PROVIDER_ZIP}" > ${VSPHERE_PROVIDER_SHAFILE} && \
sha256sum --quiet -c ${VSPHERE_PROVIDER_SHAFILE} && \
mkdir -p ~/.terraform.d/plugins/linux_amd64/ && \
unzip ${VSPHERE_PROVIDER_ZIP} -d ~/.terraform.d/plugins/linux_amd64/ && \
rm -f ${VSPHERE_PROVIDER_ZIP} ${VSPHERE_PROVIDER_SHAFILE}

### END Legacy directives for the terraform variant
RUN apt-get update && apt-get install -y ca-certificates curl openssh-server unzip

COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-vsphere/manager .
ENTRYPOINT ["./manager"]
7 changes: 0 additions & 7 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/clusterctl/examples/vsphere/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ For convenience, a generation script which populates templates where possible.
./generate-yaml.sh
```
2. To define the master machine, copy `machines.yaml.template` to `machines.yaml` and
manually edit `machineVariables`.
manually edit `machineSpec`.

3. To define nodes, copy `machineset.yaml.template` to `machineset.yaml` and
manually edit `machineVariables`. If needed, adjust `replicas` as well.
manually edit `machineSpec`. If needed, adjust `replicas` as well.

4. Copy `cluster.yaml.template` to `cluster.yaml` and
manually edit `providerConfig`.
Expand Down
11 changes: 0 additions & 11 deletions cmd/clusterctl/examples/vsphere/machines.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ items:
apiVersion: "vsphereproviderconfig/v1alpha1"
kind: "VsphereMachineProviderConfig"
vsphereMachine: "standard-master"
machineVariables:
datacenter: ""
datastore: ""
resource_pool: ""
network: ""
num_cpus: "2"
memory: "2048"
vm_template: ""
disk_label: ""
disk_size: ""
virtual_machine_domain: ""
machineSpec:
datacenter: ""
datastore: ""
Expand Down
37 changes: 13 additions & 24 deletions cmd/clusterctl/examples/vsphere/machineset.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,21 @@ spec:
apiVersion: "vsphereproviderconfig/v1alpha1"
kind: "VsphereMachineProviderConfig"
vsphereMachine: "standard-node"
machineVariables:
machineSpec:
datacenter: ""
datastore: ""
resource_pool: ""
network: ""
num_cpus: "2"
memory: "2048"
vm_template: ""
disk_label: ""
disk_size: ""
virtual_machine_domain: ""
# machineSpec:
# datacenter: ""
# datastore: ""
# resourcePool: ""
# networks:
# - networkName: ""
# ipConfig:
# networkType: dhcp
# numCPUs: 2
# memoryMB: 2048
# template: ""
# disks:
# - diskLabel: ""
# diskSizeGB: 20
# preloaded: false
resourcePool: ""
networks:
- networkName: ""
ipConfig:
networkType: dhcp
numCPUs: 2
memoryMB: 2048
template: ""
disks:
- diskLabel: ""
diskSizeGB: 20
preloaded: false
versions:
kubelet: 1.10.1
roles:
Expand Down
Loading

0 comments on commit e4135d6

Please sign in to comment.