Skip to content

Conversation

vadimeisenbergibm
Copy link
Contributor

for the Istio tutorial to be published - istio/istio.io#1035

for the Istio tutorial to be published - istio/istio.io#1035
@vadimeisenbergibm vadimeisenbergibm requested review from geeknoid and a team March 4, 2018 19:04
@istio-merge-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
We suggest the following additional approver: ldemailly

Assign the PR to them by writing /assign @ldemailly in a comment when ready.

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

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

@vadimeisenbergibm
Copy link
Contributor Author

/test istio-presubmit

@geeknoid
Copy link
Contributor

geeknoid commented Mar 4, 2018

Looks good. Mind flipping the copyright date to 2018?

Thanks.

@vadimeisenbergibm
Copy link
Contributor Author

@geeknoid yep, will sed the date to 2018.

@vadimeisenbergibm
Copy link
Contributor Author

@geeknoid I changed the year to 2017,2018, since the yamls were copied from the content of 2017, and modified where needed.

Copy link
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.

we already have (too) many bookinfo yamls, why can’t the tutorial use those ?

@ldemailly
Copy link
Member

/hold

@istio-testing istio-testing added the do-not-merge/hold Block automatic merging of a PR. label Mar 4, 2018
@vadimeisenbergibm
Copy link
Contributor Author

@ldemailly The tutorial uses the existing bookinfo yamls where possible, and also the yamls of this PR.

@vadimeisenbergibm
Copy link
Contributor Author

vadimeisenbergibm commented Mar 4, 2018

@ldemailly I have deleted bookinfo-reviews-v2-with-app-label.yaml, will
use https://github.com/istio/istio/blob/master/samples/bookinfo/kube/bookinfo-reviews-v2.yaml.

I can't see any other yamls that can be replaced by the existing ones.

@ldemailly
Copy link
Member

the problem with those is they are easy to add but add technical debt and maintenance cost for when something change and we need to update them

there should be a way to combine the 2; there are already 36 yamls in samples/bookinfo/kube we should not add 13 more
(they will rot, stop working etc... a fraction of the 36 are actually tested by e2e tests to try to avoid that issue but probably not all of them and we shouldn't add untested stuff to istio/istio )

maybe in https://github.com/istio/contrib but even there; it's easy to duplicate/create; hard to maintain/keep working

Copy link
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.

making sure we don't just merge this willy nilly

@vadimeisenbergibm
Copy link
Contributor Author

@ldemailly I propose that I will write e2e tests to test the ones I add for the tutorial. Tomorrow starts the tests week, so it is a good opportunity actually.

I do not see any way other than to have multiple yamls. I think we need to write more blogs, tutorials, documentation about Istio. If we use inline yamls in the docs, the docs themselves will rot. If we put the yamls in https://github.com/istio/contrib, without writing e2e tests, the yamls will rot in https://github.com/istio/contrib.

In my opinion - we should have as many yamls as required, with as many e2e tests as required, the more tests, the better. We should process all the yamls by scripts, for example updating all the bookinfo images in all the yamls is performed by the following script https://github.com/istio/istio/blob/master/samples/bookinfo/build_push_update_images.sh .

Once we have to update the yamls, for example when changing the route rules format, we should update all of them by a script in one stroke, using sed, etc., or writing a converter tool.

@ldemailly
Copy link
Member

sounds good to me if you add tests

can you at high level say which features are covered in the blog/tutorial that aren't already covered by the other 36 yamls / require 13 new ones?

@vadimeisenbergibm
Copy link
Contributor Author

@ldemailly I explained it in the comment of the PR: istio/istio.io#1035 (comment)

The new tutorial is different from the set of tasks at istio.io in the following way:

Each task is self contained, has its setup/cleanup. The modules in the tutorial proceed step-by-step, without setup/cleanup, enabling quick demonstration of most of the basic features in one session.
The tasks do not have any order. The modules in the tutorial flow in order, according to a developing story.
The tasks focus on a particular feature. The modules explain why the feature is needed and then present it.
The tasks explain the syntax of the Istio artifacts. The modules focus on the features and their usage, disregarding the syntax.

The non-covered feature: incremental enablement of Istio. Though it should be covered in a task as well. Also not covered by the tasks - running a single microservice on a local computer, running the single microservice in a Docker container, running Bookinfo on Kubernetes without Istio.

@ldemailly
Copy link
Member

ldemailly commented Mar 5, 2018

I had read the description in the other PR, I still don't get what specifically prevents 95% of the yamls to be the exact same (whether rules or bookinfo itself etc...) and just the ordering and/or change of cleanup

Also personally I'd rather have 1 unified better content than 2 similar yet subtly different set of tasks and stuff to maintain for the same app - why not fix whatever is wrong with the tasks? and add local computer case ?

Looking forward to the tests and minimization of new files

@vadimeisenbergibm
Copy link
Contributor Author

vadimeisenbergibm commented Mar 5, 2018

@ldemailly

I'd rather have 1 unified better content than 2 similar yet subtly different set of tasks and stuff to maintain for the same app

Let's come to terms with the fact that we will need multiple types of documentation, tailored to the different audiences/different goals. There will be always overlap between these types, the same information is presented differently. In the same way there will be external resources about Istio, videos, presentations etc.

It is not that some type is better or worse, it is the same content for different goals. Consider learning some technology. Some people prefer a book, some a video course, some face-to-face course, some prefer tutorials or blogs or video talks or live talks.

We have the following types of content on istio.io:

  • Reference - just dry description of the Istio features and specification of the Istio artifacts
  • Tasks - a set of small tasks per feature. Each task is self contained - setup/cleanup. The tasks explain the syntax of the involved artifact - route rule, etc. The tasks also show the expected output. There is no order between the tasks, the user can pick any task and follow its steps. The audience: the people who are familiar with Istio and microservices, and want to understand a particular feature of Istio.
  • Guides - these ones I do not understand, how they are different from the tasks. I would guess these are like large tasks, or a set of multiple tasks.
  • Blog - can be either small, twitter style posts - "here is my egress rule!", or large tasks, with some opinions, emotions, anecdotes, etc.
  • Tutorial - ordered small tasks to demonstrate all the basic features of Istio in short time. Also, to serve as a general introduction to microservices, demonstrates node.js, Docker, Kubernetes without Istio, then Istio. Told as a developing story, explaining various microservices concepts on the way. Can be used like an introduction for people who are not familiar with microservices at all. No cleanup/setup, no focus on syntax.

This is, of course, my opinion and I may be wrong. This is how I propose to treat different types of documentation.

Copy link
Contributor

@costinm costinm left a comment

Choose a reason for hiding this comment

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

I agree with Laurent that bookinfo config is a huge mess, and adding more configs without deleting old ones will make it even harder to understand.

For both bookinfo and e2e tests we should at least separate the 'install app' templates from the 'dynamically change things for a demo'. If we can keep at least the first part organized it'll be easier to deploy all test apps
on a cluster and have a stable test env.

Since next week we'll focus on tests - maybe this time
we'll have the new clean config replacing the old ones,
so we can add it to the circleci presubmit.

@vadimeisenbergibm
Copy link
Contributor Author

@costinm

... bookinfo config is a huge mess, and adding more configs without deleting old ones will make it even harder to understand.

I would be glad to participate in cleaning the mess during this week of tests. However, I do not understand why should this particular PR and the tutorial I wrote be dependent on the cleanup? I wrote a tutorial and got approval of several people to proceed with it, see the PR for the tutorial istio/istio.io#1035.

@vadimeisenbergibm
Copy link
Contributor Author

@ldemailly I documented per each yaml why it is needed. Please advise me which one I can remove.

  1. https://github.com/istio/istio/pull/3940/files#diff-6e685a2eae06f558715b5b2f97eb9aff It is a bookinfo yaml, without ingress and with 3 replicas per each microservice. It is used to demonstrate Bookinfo without Istio, replicated by Kubernetes. Also, it is reviews v1 only, as opposed to the standard bookinfo that contains v2 and v3. In the tutorial I present the step as a developing story, we have version 1, and then we develop version 2, we test version 2, then we gradually switch from the version 1 to version 2, then we develop version 3, then we compare version 2 and version 3, etc.
  2. https://github.com/istio/istio/pull/3940/files#diff-c3a4ad99ffcf03acc90994f0587453a4 This is reviews v2 without app label, to show that you can deploy a new version and test it in production, without connecting it to the reviews service and without sending real user traffic to it.
  3. https://github.com/istio/istio/pull/3940/files#diff-034b40de5e49bb4371b5efc6d7d747bc this is reviews v3, it is needed since in my initial version of bookinfo does not include reviews v3, for the purpose of the story.
  4. https://github.com/istio/istio/pull/3940/files#diff-17541cde1fcc0dd05cbf0d3db414defb, https://github.com/istio/istio/pull/3940/files#diff-07803d65ba1f6c7f0681f6b8422827c9 two different ingress specs, one for pure Kubernetes and one Kubernetes with Istio. They are needed to show how ingress definition is different for Kubernetes and for Istio.
  5. https://github.com/istio/istio/pull/3940/files#diff-6e18a76c45602d5924dcf00ab84807aa,https://github.com/istio/istio/pull/3940/files#diff-47270d42d34c44e4cfc265f4289b0320, https://github.com/istio/istio/pull/3940/files#diff-951ee7e2524c8d3cb57d249e73094748 are route rules to direct 90/10, 80/20, 0/100 percent of the traffic to v1/v2 of reviews.
  6. https://github.com/istio/istio/pull/3940/files#diff-7ee7f9e68a24cd4e631966db0b938802 this is a fault injection spec. This one I can remove and use https://github.com/istio/istio/blob/master/samples/bookinfo/kube/route-rule-ratings-test-abort.yaml instead
  7. https://github.com/istio/istio/pull/3940/files#diff-6f4d441332a7e1fbdd07aa7702934571 this is a route rule for mirroring. I use it because the Mirroring Task uses httpbin as the example services. In my blog, I work with Bookinfo only, to present it as a part of the developing story.
  8. https://github.com/istio/istio/pull/3940/files#diff-4635ed8841a6a8dae8231428a9b84683 this is the telemetry definition, which is inlined in Collecting Metrics and Logs task. I am ok with extracting the yaml from the task, the question is if the author of the task wanted it to be inlined to show the syntax.
  9. https://github.com/istio/istio/pull/3940/files#diff-a0996e05b2f80eb686652ae1f5e27e18 this is a whitelist policy. This task presents whitelist policy as well, however it is inlined in the document and it has three parts. In my tutorial the focus is not on the syntax, so there is no need to use three commands/three files, one file better serves the purpose.
  10. https://github.com/istio/istio/pull/3940/files#diff-c3f9523fedf8cddfade4942862593581 productpage yaml, I need it to show gradual enablement of Istio, on the productpage microservice first.

vadimeisenbergibm added a commit to vadimeisenbergibm/vadimeisenbergibm.github.io that referenced this pull request Mar 5, 2018
@vadimeisenbergibm
Copy link
Contributor Author

closing this PR, I will work on restructuring samples/bookinfo first

@vadimeisenbergibm
Copy link
Contributor Author

Reopening following #4042 (comment).

@vadimeisenbergibm
Copy link
Contributor Author

/test istio-pilot-e2e

@vadimeisenbergibm
Copy link
Contributor Author

/test istio-unit-tests

@codecov
Copy link

codecov bot commented Mar 11, 2018

Codecov Report

Merging #3940 into master will decrease coverage by 1%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #3940    +/-   ##
=======================================
- Coverage      73%     73%   -<1%     
=======================================
  Files         313     313            
  Lines       28135   28759   +624     
=======================================
+ Hits        20520   20937   +417     
- Misses       6349    6500   +151     
- Partials     1266    1322    +56
Impacted Files Coverage Δ
mixer/adapter/stackdriver/stackdriver.go 55% <0%> (-15%) ⬇️
mixer/adapter/solarwinds/log_handler.go 50% <0%> (-7%) ⬇️
mixer/adapter/prometheus/prometheus.go 80% <0%> (-3%) ⬇️
mixer/adapter/prometheus/server.go 95% <0%> (-1%) ⬇️
pilot/pkg/proxy/envoy/v2/mesh.go 75% <0%> (ø) ⬇️
mixer/adapter/stackdriver/metric/bufferedClient.go 93% <0%> (ø) ⬇️
mixer/template/sample/template.gen.go 55% <0%> (ø) ⬇️
broker/pkg/model/config/store.go 100% <0%> (ø) ⬆️
mixer/adapter/list/regexList.go 100% <0%> (ø) ⬆️
pilot/pkg/model/controller.go 100% <0%> (ø) ⬆️
... and 12 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 f8cd83a...7caae4e. Read the comment docs.

@istio-testing
Copy link
Collaborator

istio-testing commented Mar 11, 2018

@vadimeisenbergibm: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-pilot-e2e.sh 7caae4e link /test istio-pilot-e2e

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.

@vadimeisenbergibm
Copy link
Contributor Author

closing to submit file by file, with matching tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Block automatic merging of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants