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

Add istio.io repo #9983

Merged
merged 5 commits into from Jan 2, 2019
Merged

Add istio.io repo #9983

merged 5 commits into from Jan 2, 2019

Conversation

clyang82
Copy link
Member

Signed-off-by: Chun Lin Yang clyang@cn.ibm.com

  1. Add istio.io repo before run helm dep update
  2. Update the istio.io repo to release url in release package
  3. the cmd exits if there is no required args
  4. show usage only when run create_release_archives.sh
  5. Do not create temp fold in the beginning

@istio-testing
Copy link
Collaborator

Hi @clyang82. Thanks for your PR.

I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@clyang82
Copy link
Member Author

/ @linsun @hklai

@clyang82 clyang82 mentioned this pull request Nov 15, 2018
function replace_with_release_charts_url() {
local origin_url="istio-prerelease/daily-build/master-latest-daily/charts"
local target_url="istio-release/releases/${VER_STRING}/charts"
sed -i.bak "s:${origin_url}:${target_url}:g" "${COMMON_FILES_DIR}/install/kubernetes/helm/istio/README.md"
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, would let @hklai to confirm this is correct urls.

@linsun
Copy link
Member

linsun commented Nov 15, 2018

/ok-to-test

@istio-testing istio-testing added ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member. and removed needs-ok-to-test labels Nov 15, 2018
@@ -116,6 +116,11 @@ The chart deploys pods that consume minimum resources as specified in the resour
EOF
```

1. Add `istio.io` chart repository and point to the release:
```
$ helm repo add istio.io https://storage.googleapis.com/istio-prerelease/daily-build/master-latest-daily/charts
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is release-1.1, you probably want to use https://storage.googleapis.com/istio-prerelease/daily-build/release-1.1-latest-daily/charts instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

the code in release-1.1 will be merged back to master. so if change it to release-1.1, it is confused in master. so how about just keep as it is? the released packages have the correct url.

Copy link
Member Author

Choose a reason for hiding this comment

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

@hklai Does it make sense? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

The same is true for many other things, like api and proxy shas, and the versions hardcoded in some helm config.

I suppose we should keep this specific to release-1.1 as it might have (or will be) diverged from master.

Copy link
Member Author

Choose a reason for hiding this comment

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

okay. let us use https://storage.googleapis.com/istio-prerelease/daily-build/release-1.1-latest-daily/charts instead.

@@ -15,16 +15,12 @@
#
################################################################################

set -o errexit
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you move these down?

Copy link
Member Author

Choose a reason for hiding this comment

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

set -o errexit
set -o pipefail
set -x

Move them together to ensure perform this cmd create_release_archives.sh only show the usage without unnecessary information

Before changes:

chunlins-mbp:istio clyang$ ./release/create_release_archives.sh 
++ mktemp -d /tmp/istio.version.XXXX
+ TEMP_DIR=/tmp/istio.version.wORR
+ BASE_DIR=/tmp/istio.version.wORR
+ ISTIOCTL_SUBDIR=istioctl
+ OUTPUT_PATH=
+ VER_STRING=
+ getopts d:i:o:v: arg
+ [[ -z /tmp/istio.version.wORR ]]
+ [[ -z '' ]]
+ usage
+ echo './release/create_release_archives.sh
    -d <path> path to use for temp directory                  (optional, randomized default is /tmp/istio.version.wORR )
    -o <path> path where build output/artifacts are stored    (required)
    -i <name> subdirectory in -o path to use for istioctl     (optional)
    -v <ver>  version info to include in filename (e.g., 1.0) (required)'
./release/create_release_archives.sh
    -d <path> path to use for temp directory                  (optional, randomized default is /tmp/istio.version.wORR )
    -o <path> path where build output/artifacts are stored    (required)
    -i <name> subdirectory in -o path to use for istioctl     (optional)
    -v <ver>  version info to include in filename (e.g., 1.0) (required)
+ exit 1

After Changes:

chunlins-mbp:istio clyang$ ./release/create_release_archives.sh 
./release/create_release_archives.sh
    -d <path> path to use for temp directory                  (optional, randomized default is /tmp/istio.version.XXXX )
    -o <path> path where build output/artifacts are stored    (required)
    -i <name> subdirectory in -o path to use for istioctl     (optional)
    -v <ver>  version info to include in filename (e.g., 1.0) (required)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's ignore those for now. This file is not mean to be used by human directly anyway, and @rkpagadala is moving stuff around.

I suggest we just revert.

Copy link
Member Author

Choose a reason for hiding this comment

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

@hklai If we can make it use by human directly, why not. At least, when I did test the release package, I need to run this Shell to generate the package. Then show the usage more friendly is not so bad. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK it's fine to make it more usable.

# This script primarily exists for Cloud Builder. This script
# reads artifacts from a specified directory, generates tar files
# based on those artifacts, and then stores the tar files
# back to the directory.

TEMP_DIR="$(mktemp -d /tmp/istio.version.XXXX)"
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Member Author

Choose a reason for hiding this comment

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

mktemp will be performed always in the beginning. but rm -rf "$TEMP_DIR" in the end. sometimes, there is error in the middle so that the "$TEMP_DIR" cannot be removed as expected.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want to just a clean and new temp folder always to avoid confusion. Cleaning up temp files is typically best effort.

Copy link
Member Author

Choose a reason for hiding this comment

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

see this example:

chunlins-mbp:istio clyang$ ./release/create_release_archives.sh 
++ mktemp -d /tmp/istio.version.XXXX
+ TEMP_DIR=/tmp/istio.version.wORR
+ BASE_DIR=/tmp/istio.version.wORR
+ ISTIOCTL_SUBDIR=istioctl
+ OUTPUT_PATH=
+ VER_STRING=
+ getopts d:i:o:v: arg
+ [[ -z /tmp/istio.version.wORR ]]
+ [[ -z '' ]]
+ usage
+ echo './release/create_release_archives.sh
    -d <path> path to use for temp directory                  (optional, randomized default is /tmp/istio.version.wORR )
    -o <path> path where build output/artifacts are stored    (required)
    -i <name> subdirectory in -o path to use for istioctl     (optional)
    -v <ver>  version info to include in filename (e.g., 1.0) (required)'
./release/create_release_archives.sh
    -d <path> path to use for temp directory                  (optional, randomized default is /tmp/istio.version.wORR )
    -o <path> path where build output/artifacts are stored    (required)
    -i <name> subdirectory in -o path to use for istioctl     (optional)
    -v <ver>  version info to include in filename (e.g., 1.0) (required)
+ exit 1

The temp folder is created but never be cleaned.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can add a trap EXIT to make sure cleanup happens even in error path

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@@ -45,6 +41,11 @@ function error_exit() {
exit "${2:-1}"
}

# since there are 2 required options, should show usage and exit with no args specified
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the following does exactly that?

[[ -z "${BASE_DIR}" ]] && usage
[[ -z "${OUTPUT_PATH}" ]] && usage
[[ -z "${VER_STRING}" ]] && usage

if ("${BASE_DIR}" = "${TEMP_DIR}"); then
mktemp -d "${TEMP_DIR}"
Copy link
Contributor

Choose a reason for hiding this comment

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

should have been created above?

@@ -69,6 +77,13 @@ mkdir -p "${BIN_DIR}"
CP=${CP:-"cp"}
TAR=${TAR:-"tar"}

function replace_with_release_charts_url() {
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks like you want do perform this replacement for monthly/LTS/patch release only, but not daily releases, which are stored in the prerelease directory only.

Copy link
Member Author

Choose a reason for hiding this comment

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

Could you point me out which flag can be used to check it is not a daily release? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

@clyang82 you can check if
CB_PIPELINE_TYPE == monthly
you will also need to a line at https://github.com/istio/istio/blob/master/prow/release-test.sh#L47 declaring type as daily
export CB_PIPELINE_TYPE=daily

Copy link
Member Author

Choose a reason for hiding this comment

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

@rkpagadala Thanks for your help. I have updated accordingly.

@codecov
Copy link

codecov bot commented Nov 21, 2018

Codecov Report

Merging #9983 into release-1.1 will increase coverage by 3%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##           release-1.1   #9983     +/-   ##
=============================================
+ Coverage           68%     70%     +3%     
=============================================
  Files              571     442    -129     
  Lines            48706   41352   -7354     
=============================================
- Hits             32982   28878   -4104     
+ Misses           13946   11064   -2882     
+ Partials          1778    1410    -368
Impacted Files Coverage Δ
mixer/adapter/inventory.gen.go 0% <0%> (-100%) ⬇️
pilot/pkg/networking/plugin/mixer/mixer.go 1% <0%> (-77%) ⬇️
mixer/adapter/rbac/rbac.go 0% <0%> (-70%) ⬇️
galley/pkg/meshconfig/cache.go 0% <0%> (-63%) ⬇️
pkg/mcp/server/monitoring.go 3% <0%> (-57%) ⬇️
mixer/pkg/runtime/config/queries.go 64% <0%> (-36%) ⬇️
mixer/pkg/runtime/config/snapshot.go 58% <0%> (-36%) ⬇️
pilot/pkg/serviceregistry/memory/discovery.go 57% <0%> (-29%) ⬇️
pilot/pkg/proxy/envoy/discovery.go 0% <0%> (-29%) ⬇️
mixer/adapter/stackdriver/stackdriver.go 50% <0%> (-28%) ⬇️
... and 271 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c24863b...ee90930. Read the comment docs.

@@ -45,6 +45,7 @@ cat << EOF > "/workspace/gcb_env.sh"
export CB_BRANCH="${GIT_SHA}"
export CB_VERSION="${GIT_SHA}"
export CB_ISTIOCTL_DOCKER_HUB="docker.io/istio"
export CB_PIPELINE_TYPE=daily
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we need two tests for the two types?

Copy link
Member Author

@clyang82 clyang82 Nov 28, 2018

Choose a reason for hiding this comment

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

for test coverage purpose, I think we should have two tests for the two types. but considering the 2 factors:

  1. there is no many differences for the two types right now.
  2. add one more test needs spend extra 13 minutes.
    Maybe we can consider in the future.
    @hklai @rkpagadala

@clyang82
Copy link
Member Author

@hklai This PR should be included into release-1.1. Could you please approve and help to merge if you have no more comments? Thanks.

@@ -116,6 +116,11 @@ The chart deploys pods that consume minimum resources as specified in the resour
EOF
```

1. Add `istio.io` chart repository and point to the release:
```
$ helm repo add istio.io https://storage.googleapis.com/istio-prerelease/daily-build/release-1.1-latest-daily/charts
Copy link
Contributor

Choose a reason for hiding this comment

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

What will be the URL for production users ? We can't use prerelease and storage.

Copy link
Member Author

Choose a reason for hiding this comment

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

it will be replaced during creating release package.

  if [ "${CB_PIPELINE_TYPE}" = "monthly" ]; then
    local origin_url="istio-prerelease/daily-build/master-latest-daily/charts"
    local target_url="istio-release/releases/${VER_STRING}/charts"
    sed -i.bak "s:${origin_url}:${target_url}:g" "${COMMON_FILES_DIR}/install/kubernetes/helm/istio/README.md"
    rm -rf "${COMMON_FILES_DIR}/install/kubernetes/helm/istio/README.md.bak"
  fi
}

Copy link
Member

Choose a reason for hiding this comment

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

@clyang82 Can you please add some comments to production users here? +1 to @costinm , it seems to be weird to use pre release here.

@costinm
Copy link
Contributor

costinm commented Nov 29, 2018

Can you explain why the change is made - I'm not sure I follow.

It looks like we are moving towards operator and away from depending on specific helm features - I think we need to re-evaluate if we even want the 'helm dep update' in 1.1, or move back the subcharts like in 1.0

If I remember correctly, it was added for cni - but for CNI we can simply treat it as a separate module ( consistent with the 'modularization' model). It seems we agreed on multi-step install , and for 'beginner' case we'll not need CNI.

@costinm
Copy link
Contributor

costinm commented Nov 29, 2018

/hold

@istio-testing istio-testing added the do-not-merge/hold Block automatic merging of a PR. label Nov 29, 2018
@clyang82
Copy link
Member Author

@costinm right now, based on release-1.1, we have to run helm dep update for installation. it will throws error something like cannot find istio.io so that we need to run helm repo add istio.io xxx. we have different location for release and prerelease. that is why have the change.

@@ -154,9 +175,9 @@ ls -l "${COMMON_FILES_DIR}/install/kubernetes/helm/istio"
# Changing dir such that tar and zip files are
# created with right hiereachy
pushd "${COMMON_FILES_DIR}/.."
replace_with_release_charts_url
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be done in https://github.com/istio/istio/blob/master/release/gcb/modify_values.sh instead?

That is where we modify all helm related values.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure. done. Thanks.

@istio-testing istio-testing added the needs-rebase Indicates a PR needs to be rebased before being merged label Nov 30, 2018
@istio-testing istio-testing removed the needs-rebase Indicates a PR needs to be rebased before being merged label Nov 30, 2018
@istio-testing
Copy link
Collaborator

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

Test name Commit Details Rerun command
prow//e2e-simpleTests-minProfile.sh 16a04a66652637584d6df05cd9c6c6e185ac5ba3 link /test e2e-simpleTestsMinProfile
prow/e2e-mixer-no_auth-mcp.sh 16a04a66652637584d6df05cd9c6c6e185ac5ba3 link /test e2e-mixer-no_auth-mcp

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.

@clyang82
Copy link
Member Author

/test test
/test e2e-mixer-noauth-v1alpha3-v2

Copy link
Contributor

@hklai hklai left a comment

Choose a reason for hiding this comment

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

/lgtm

@clyang82
Copy link
Member Author

clyang82 commented Dec 1, 2018

@costinm can you please remove the hold flag if you are OK with my changes? Thanks

@clyang82
Copy link
Member Author

clyang82 commented Dec 1, 2018

/test test
/test e2e-mixer-noauth-v1alpha3-v2

@stale
Copy link

stale bot commented Dec 15, 2018

This pull request has been automatically marked as stale because it has not had activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Dec 15, 2018
@clyang82
Copy link
Member Author

@costinm I think this PR must be in release 1.1. any comments? Could you please remove the hold flag?

@stale stale bot removed the stale label Dec 16, 2018
@clyang82
Copy link
Member Author

@linsun @hklai Can you help to merge this PR? Thanks.

@hklai hklai removed the do-not-merge/hold Block automatic merging of a PR. label Dec 20, 2018
@clyang82
Copy link
Member Author

/retest

Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
Signed-off-by: Chun Lin Yang <clyang@cn.ibm.com>
@linsun
Copy link
Member

linsun commented Jan 2, 2019

/lgtm

/approve

@istio-testing
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clyang82, hklai, linsun

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@linsun linsun merged commit 45333c9 into istio:release-1.1 Jan 2, 2019
@clyang82 clyang82 deleted the add_istio.io_repo branch January 11, 2019 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Set this label allow normal testing to take place for a PR not submitted by an Istio org member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants