Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make istio installer suitable for use in scripts #568

Closed
ebullient opened this issue Aug 16, 2017 · 3 comments
Closed

Make istio installer suitable for use in scripts #568

ebullient opened this issue Aug 16, 2017 · 3 comments

Comments

@ebullient
Copy link

Helm's install script uses environment variables to tweak its behavior (install directory, desired version), and it copies the binary into a known location. This allows the script to be used repeatably in scripted installs (Vagrantfile, etc).

As it stands now, you have to run the script and manually add the binary to the path (either by updating the PATH, or copying the binary). This is made a little more difficult due to the version in the path name:

Add /home/vagrant/istio-0.1.6/bin to your path; e.g copy paste in your shell and/or ~/.profile:
export PATH="$PATH:/home/vagrant/istio-0.1.6/bin"

Is there interest in changing that behavior? I can propose an update to the script (not immediately, but I'm happy to do it) if there are no objections to making it work that way.

@ldemailly
Copy link
Contributor

it's very important for the distribution tar directory to include the version, so you can go back and forth between versions and not accidentally clobber one version's file with another.

I don't see why whoever consumes the .tar.gz can't move the binary ? the

Add /home/vagrant/istio-0.1.6/bin to your path; e.g copy paste in your shell and/or ~/.profile:

is just a suggestion, you can also just copy it in your path

going to close this but do reopen if I misunderstood your point
(and / or open a PR to make the installer text more clear)

@ebullient
Copy link
Author

I can't reopen this issue. Comparison: https://docs.helm.sh/using_helm/#from-script

Includes this if I want to pin the version:

# checkDesiredVersion checks if the desired version is available.
checkDesiredVersion() {
  # Use the GitHub releases webpage for the project to find the desired version for this project.
  local release_url="https://github.com/kubernetes/helm/releases/${DESIRED_VERSION:-latest}"
  if type "curl" > /dev/null; then
    TAG=$(curl -SsL $release_url | awk '/\/tag\//' | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
  elif type "wget" > /dev/null; then
    TAG=$(wget -q -O - $release_url | awk '/\/tag\//' | cut -d '"' -f 2 | awk '{n=split($NF,a,"/");print a[n]}' | awk 'a !~ $0{print}; {a=$0}')
  fi
  if [ "x$TAG" == "x" ]; then
    echo "Cannot determine ${DESIRED_VERSION} tag."
    exit 1
  fi
}

checks that against installed version, etc. I can include/use that file in provisioning scripts (Vagrant and/or other custom launch scripts) with minimum fuss.

I have worked around in my scripts this way:

    curl -L https://git.io/getIstio | sh -
    mv istio-*/bin/istioctl /home/vagrant/bin/
    rm -r istio-*

(because I don't want to spend a lot of time in a Vagrant config updating the .bashrc to contain version numbers).

Helm's script fits right in here without my having to do anything. I can set an environment variable to tell it where the binary should go, and another to pin the version to fetch. The rest is handled.

@ldemailly
Copy link
Contributor

ldemailly commented Aug 22, 2017

maybe we'll switch to a package (and/or someone can contribute brew and other packages) that actually "installs" instead of just downloads like it does today. but for now I don't see a concrete proposal of what you'd like/need ?

your workaround seems fine to me?

mandarjog pushed a commit to mandarjog/istio that referenced this issue Oct 30, 2017
Former-commit-id: a4eb3e82d12129abc3850c59636e1341229095da
mandarjog pushed a commit that referenced this issue Oct 31, 2017
Former-commit-id: 08dfccdd66f6ee96908962ee94919aaf7989573c
rshriram pushed a commit to rshriram/istio that referenced this issue Jul 31, 2018
* source_ip field is bool

- on the envoy side the source_ip field is
used as an indicator to determine whether or not
to use it as the hash value.

https://github.com/envoyproxy/envoy/blob/2c3c3e7546451a03cf4b7e9036ee48dda26fe49c/api/envoy/api/v2/route/route.proto#L535

* field now called use_source_ip
rshriram pushed a commit to rshriram/istio that referenced this issue Jul 31, 2018
* Add a Readme.md file for the MCP protocol. (istio#565)

* Add a Readme.md file for the MCP protocol.

* Add a link to the XDS protocol.

* source_ip field is bool (istio#568)

* source_ip field is bool

- on the envoy side the source_ip field is
used as an indicator to determine whether or not
to use it as the hash value.

https://github.com/envoyproxy/envoy/blob/2c3c3e7546451a03cf4b7e9036ee48dda26fe49c/api/envoy/api/v2/route/route.proto#L535

* field now called use_source_ip

* Fix typos in comments. (istio#571)
howardjohn added a commit to howardjohn/istio that referenced this issue Jan 12, 2020
incfly pushed a commit to incfly/istio that referenced this issue Nov 16, 2021
Bump up upstream Istio dependency to 20210420 f278cd9.
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

No branches or pull requests

2 participants