Initial version of the VM helpers, extracted from the test script.#737
Initial version of the VM helpers, extracted from the test script.#737istio-merge-robot merged 13 commits intomasterfrom
Conversation
rshriram
left a comment
There was a problem hiding this comment.
Copyright missing.. some naming consistency. Otherwise looks ok
| @@ -0,0 +1,223 @@ | |||
| #!/usr/bin/env bash | |||
| #!/usr/bin/env bash | ||
|
|
||
| # Helper functions for extending the cluster with external VMs. | ||
|
|
There was a problem hiding this comment.
Cluster -> mesh
Helper functions for extending istio mesh outside kubernetes
| # 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. |
| kind: Service | ||
| metadata: | ||
| name: istio-pilot-ilb | ||
| annotations: |
There was a problem hiding this comment.
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 )
There was a problem hiding this comment.
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 )
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Consistent naming. Istio-mixer, kube-dns, etc
install/tools/istio_vm_common.sh
Outdated
| # - name of the VM - used to copy files over. | ||
| # - service account to be provisioned (defaults to istio.default) | ||
| function istioProvisionVM() { | ||
| NAME=${1} |
There was a problem hiding this comment.
how about istioBootstrapVM (or Node?) ? Service Instance is super confusing (with the actual service ), we're provisioning a machine.
| NAME=${1} | ||
|
|
||
| local SA=${2:-istio.default} | ||
|
|
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
Are these .deb files only working on certain platforms?
There was a problem hiding this comment.
I tested on current debian and xenial. Should work on other similar platforms.
There was a problem hiding this comment.
Only tested on current deb and xenial.
For Trusty would be tricky ( envoy c++ deps ), but it is possible with a special build.
install/tools/istio_vm_common.sh
Outdated
| if [[ ${ISTIO_ZONE:-} != "" ]]; then | ||
| OPTS="$OPTS --zone $ISTIO_ZONE" | ||
| fi | ||
| echo $OPTS |
There was a problem hiding this comment.
Is it possible to have cloud platform dependent methods in one file vs spread out? That seems easier to maintain.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
could we document dependencies and params for this helper script?
| metadata: | ||
| name: istio-ca-ilb | ||
| annotations: | ||
| cloud.google.com/load-balancer-type: "internal" |
There was a problem hiding this comment.
could the annotation/name be kept generic, e.g. not platform specific?
There was a problem hiding this comment.
Unfortunately that's the magic syntax that is required. We can add multiple annotations ( to cover the other platforms that need magic strings ).
There was a problem hiding this comment.
See above - hopefully a 'standard' k8s emerges, but until then we'll need one for each platform.
|
/test |
|
/retest |
| # by istioProvisionVM | ||
| function istioCopyBuildFiles() { | ||
| local ISTIO_IO=${ISTIO_BASE:-${GOPATH:-$HOME/go}}/src/istio.io | ||
| local ISTIO_FILES=${ISTIO_FILES:-.} |
There was a problem hiding this comment.
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...
|
|
||
| # Script to install istio components for the raw VM. | ||
|
|
||
| # Environment variable pointing to the generated Istio configs and binaries. |
There was a problem hiding this comment.
directory ? can it really be files ? for example ?
There was a problem hiding this comment.
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.
install/tools/istio_vm_setup.sh
Outdated
|
|
||
| # Copy config files for DNS | ||
| chmod go+r ${ISTIO_FILES}/kubedns | ||
| cp ${ISTIO_FILES}/kubedns /etc/dnsmasq.d |
There was a problem hiding this comment.
k rename to ISTIO_STAGE_DIR or some such, it's not FILES
install/tools/istio_vm_setup.sh
Outdated
| istioNetworkInit | ||
| istioInstall | ||
| istioRestart | ||
| fi No newline at end of file |
|
/lgtm |
|
please put release notes also |
|
/lgtm cancel //PR changed after LGTM, removing LGTM. @costinm @ldemailly |
|
/lgtm |
|
/lgtm cancel //PR changed after LGTM, removing LGTM. @costinm @ldemailly |
|
/lgtm |
|
[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. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue |
|
@costinm: The following tests failed, say
DetailsInstructions 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. |
) 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
…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
) 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
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 ```
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.