Skip to content

Initial version of the VM helpers, extracted from the test script.#737

Merged
istio-merge-robot merged 13 commits intomasterfrom
costin-vm
Sep 13, 2017
Merged

Initial version of the VM helpers, extracted from the test script.#737
istio-merge-robot merged 13 commits intomasterfrom
costin-vm

Conversation

@costinm
Copy link
Copy Markdown
Contributor

@costinm costinm commented Sep 11, 2017

We'll need to update them with the commands to copy files to other clusters - right now
I only have gcloud. Also need more polish - and some instructions or helper to download all
needed artifacts.

Added scripts for VM setup (cluster extension)

Copy link
Copy Markdown
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright missing.. some naming consistency. Otherwise looks ok

@@ -0,0 +1,223 @@
#!/usr/bin/env bash
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright missing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#!/usr/bin/env bash

# Helper functions for extending the cluster with external VMs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cluster -> mesh
Helper functions for extending istio mesh outside kubernetes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# ISTIO_NAMESPACE - if not set the default in .kube/config is used.
# ISTIO_FILES - directory where istio artifacts are downloaded, default to current dir

# Initialize internal load balancers to access K8S DNS and Istio Pilot, Mixer, CA.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

K8s to kubernetes

kind: Service
metadata:
name: istio-pilot-ilb
annotations:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Istio-pilot-ilb-gcp

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of other clusters using ILB, I didn't add the other annotations since I
didn't have time to test them. I think in the case of bluemix ( and possibly
others ) this creates a regular internal service (annotation ignored), but still routable from the VMs.

Maybe I should call it istio-pilot-ext ? ( since in some cases an ILB is not needed )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not gcp-specific, the service will be used for other providers as well.
(and we'll add annotations as needed by the other providers )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

istio-pilot-alt?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or leave it as is

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave it as is if you don't mind, we can probably merge it into the main configs ( just add annotations to the 'real service' ) after we get more testing.

apiVersion: v1
kind: Service
metadata:
name: mixer-ilb
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistent naming. Istio-mixer, kube-dns, etc

# - name of the VM - used to copy files over.
# - service account to be provisioned (defaults to istio.default)
function istioProvisionVM() {
NAME=${1}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

istioBootstrapServiceInstance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about istioBootstrapVM (or Node?) ? Service Instance is super confusing (with the actual service ), we're provisioning a machine.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node is good!

NAME=${1}

local SA=${2:-istio.default}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need comments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done ( and will keep adding as we refine it ).

(cd $ISTIO_IO/pilot; bazel build tools/deb/... )
(cd $ISTIO_IO/auth; bazel build tools/deb/... )

cp $ISTIO_IO/proxy/bazel-bin/tools/deb/istio-proxy-envoy.deb \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these .deb files only working on certain platforms?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested on current debian and xenial. Should work on other similar platforms.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only tested on current deb and xenial.
For Trusty would be tricky ( envoy c++ deps ), but it is possible with a special build.

if [[ ${ISTIO_ZONE:-} != "" ]]; then
OPTS="$OPTS --zone $ISTIO_ZONE"
fi
echo $OPTS
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have cloud platform dependent methods in one file vs spread out? That seems easier to maintain.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to group them, technically I can get rid of this function and rely on defaults.
I suppose I can also use env variables to inject 'gcloud' if it is a major concern - we can
refine it as we test on more platforms.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a separate PR ?

# ISTIO_FILES - directory where istio artifacts are downloaded, default to current dir

# Initialize internal load balancers to access K8S DNS and Istio Pilot, Mixer, CA.
# Must be run once per cluster.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we document dependencies and params for this helper script?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

metadata:
name: istio-ca-ilb
annotations:
cloud.google.com/load-balancer-type: "internal"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could the annotation/name be kept generic, e.g. not platform specific?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately that's the magic syntax that is required. We can add multiple annotations ( to cover the other platforms that need magic strings ).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above - hopefully a 'standard' k8s emerges, but until then we'll need one for each platform.

@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Sep 13, 2017

/test

@costinm
Copy link
Copy Markdown
Contributor Author

costinm commented Sep 13, 2017

/retest

Copy link
Copy Markdown
Member

@ldemailly ldemailly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit/confusion

# by istioProvisionVM
function istioCopyBuildFiles() {
local ISTIO_IO=${ISTIO_BASE:-${GOPATH:-$HOME/go}}/src/istio.io
local ISTIO_FILES=${ISTIO_FILES:-.}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not super clear to me what that variable is/does exactly in this function, is it a destination directory, a source dir, a set of files...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more docs.


# Script to install istio components for the raw VM.

# Environment variable pointing to the generated Istio configs and binaries.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directory ? can it really be files ? for example ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example "." - we'll need to adjust this based on how we distribute, probably a bunch of curl to
fetch the .deb files, or a tar (as you suggested earlier).
Added a TODO, since I don't know yet.


# Copy config files for DNS
chmod go+r ${ISTIO_FILES}/kubedns
cp ${ISTIO_FILES}/kubedns /etc/dnsmasq.d
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k rename to ISTIO_STAGE_DIR or some such, it's not FILES

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

istioNetworkInit
istioInstall
istioRestart
fi No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing new line

@ldemailly
Copy link
Copy Markdown
Member

/lgtm

@ldemailly
Copy link
Copy Markdown
Member

please put release notes also

@istio-merge-robot
Copy link
Copy Markdown

/lgtm cancel //PR changed after LGTM, removing LGTM. @costinm @ldemailly

@ldemailly
Copy link
Copy Markdown
Member

/lgtm

@istio-merge-robot
Copy link
Copy Markdown

/lgtm cancel //PR changed after LGTM, removing LGTM. @costinm @ldemailly

@ldemailly
Copy link
Copy Markdown
Member

/lgtm

@istio-merge-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ldemailly

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@istio-merge-robot
Copy link
Copy Markdown

/test all [submit-queue is verifying that this PR is safe to merge]

@istio-merge-robot
Copy link
Copy Markdown

Automatic merge from submit-queue

@istio-merge-robot istio-merge-robot merged commit a45134d into master Sep 13, 2017
@istio-testing
Copy link
Copy Markdown
Collaborator

@costinm: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/new-e2e-rbac_no_auth.sh 758d4a6 link /test new-e2e-rbac_no_auth
prow/e2e-suite-rbac-no_auth.sh 59cd27c link /test e2e-suite-rbac-no_auth
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@costinm costinm deleted the costin-vm branch September 14, 2017 20:43
rshriram pushed a commit that referenced this pull request Oct 30, 2017
)

Automatic merge from submit-queue

Initial version of the VM helpers, extracted from the test script.

We'll need to update them with the commands to copy files to other clusters - right now 
I only have gcloud. Also need more polish - and some instructions or helper to download all 
needed artifacts.

```release-note
Added scripts for VM setup (cluster extension)
```

Former-commit-id: a45134d
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
…stio#737)

Automatic merge from submit-queue

Initial version of the VM helpers, extracted from the test script.

We'll need to update them with the commands to copy files to other clusters - right now 
I only have gcloud. Also need more polish - and some instructions or helper to download all 
needed artifacts.

```release-note
Added scripts for VM setup (cluster extension)
```

Former-commit-id: a45134d
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
)

Automatic merge from submit-queue

Initial version of the VM helpers, extracted from the test script.

We'll need to update them with the commands to copy files to other clusters - right now 
I only have gcloud. Also need more polish - and some instructions or helper to download all 
needed artifacts.

```release-note
Added scripts for VM setup (cluster extension)
```

Former-commit-id: a45134d
kyessenov pushed a commit to kyessenov/istio that referenced this pull request Aug 13, 2018
Automatic merge from submit-queue.

[DO NOT MERGE] Auto PR to update dependencies of proxy

This PR will be merged automatically once checks are successful.
```release-note
none
```
howardjohn pushed a commit to howardjohn/istio that referenced this pull request Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants