-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Consul related Dockerfiles and rule yamls #674
Conversation
samples/apps/bookinfo/CONSUL.md
Outdated
## Bookinfo Demo | ||
|
||
The ingress controller is still under construction, rounting functionalities can be tested by curling a service container directly. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/rounting/routing/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest moving most of these files to a separate directory (e.g., samples/apps/bookinfo/consul), except the ones that can't be (like the Dockerfiles)
samples/apps/bookinfo/CONSUL.md
Outdated
When a service instance is brought up in docker, the [Registrator](http://gliderlabs.github.io/registrator/latest/) | ||
automatically registers the service in Consul. | ||
|
||
Noted that Istio pilot is running inside each app container so as to coordinate Envoy and the service mesh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about pilot agent, isn't it? We refer to Istio pilot as the central pilot, taking care of discovery.
@@ -0,0 +1,76 @@ | |||
# Consul Adapter for Istio on Docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good write-up for a task, I hope you will move it to istio.io.
samples/apps/bookinfo/CONSUL.md
Outdated
|
||
Noted that Istio pilot is running inside each app container so as to coordinate Envoy and the service mesh. | ||
|
||
## Prequisites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prerequisites.
You can create basic routing rules using istioctl from the `/bookinfo` directory: | ||
|
||
``` | ||
istioctl create -f consul-reviews-v1.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rules have been moved to /rules directory. It would be good to place them there from the beginning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest bookinfo/consul, or maybe bookinfo/consul/rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andraxylia not all rules have been moved to /rules. There are duplicates in both directories. the rules in /rules can be used by kubectl only, when I tried yesterday they did not work with istioctl
$ istioctl create -f ../rules/route-rule-all-v1.yaml
Error: cannot parse proto message: unknown spec type
conversation yesterday in #pilot
Laurent Demailly [1:54 PM]
afaik istioctl understand bookinfo/ and kubetcl understands bookinfo/rules/
[1:55]
ie istioctl doesn't understand v2
kuat
[1:55 PM]
istioctl understands v2 spec but v1 meta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do something about this, like moving the old rules under a directory v0.1 or similar. Having them at the top level would be very confusing. Of course, this can be done separate from your PR, but in your PR I would refer to the new rules and use kubectl, if istioctl has not been fixed to understand v2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rule files in bookinfo are obsolete v1 - they won't work with istioctl or kubectl. They will be removed as soon as we figure out how to fix broken links in blog. The rules in /rules are the new ones, currently only work with kubectl, until istioctl is changed to use the same format as kubectl.
Your rules in this PR seem to written using the partial-v2 istioctl-compatible format, which will work for now, but once istioctl is updated to support the proper new format, they will need to be changed.
So, I think you are OK to put your rules in /consul/rules and use istioctl to create them for now.
@@ -0,0 +1,92 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being copied here? We have a version in pilot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. we need to reuse that one.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andraxylia 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 |
/lgtm cancel //PR changed after LGTM, removing LGTM. @GregHanson @andraxylia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very good start. I suggest creating a consul branch in istio/istio and pushing all this there. We can all refine this.. There is a lot of cleanups that can be done. I am worried about the need to manually update app images, for each proxy/pilot update - and would prefer to do this in automated fashion. Ideally, we should be able to use the debian package that @costinm has in the istio/proxy branch in order to install all the istio proxy stuff (including the iptables). We should just reuse the pilot discovery container as is, and override the kubeconfig path and registry via the Entrypoint. If its not created that way, lets fix that.
samples/apps/bookinfo/CONSUL.md
Outdated
When a service instance is brought up in docker, the [Registrator](http://gliderlabs.github.io/registrator/latest/) | ||
automatically registers the service in Consul. | ||
|
||
Noted that Istio pilot is running inside each app container so as to coordinate Envoy and the service mesh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that. Is this istio pilot agent ?
@@ -95,7 +95,7 @@ function create_windows_archive() { | |||
|
|||
pushd ${ROOT} | |||
${CP} istio.VERSION LICENSE README.md CONTRIBUTING.md "${COMMON_FILES_DIR}"/ | |||
find samples install -type f \( -name "*.yaml" -o -name "cleanup*" -o -name "README.md" \) \ | |||
find samples install -type f \( -name "*.yaml" -o -name "cleanup*" -o -name "README.md" -o -name "CONSUL.md" \) \ | |||
-exec ${CP} --parents {} "${COMMON_FILES_DIR}" \; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't ship this. This goes in docs.
@@ -0,0 +1,92 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. we need to reuse that one.
@@ -0,0 +1,8 @@ | |||
FROM lyft/envoy:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need envoy on the pilot agent?
moving PR to #681 pushed to consul branch in istio/istio so anyone can contribute to the source as needed |
@GregHanson: The following tests failed, say
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. |
Automatic merge from submit-queue Consul related files for istio release **Release note**: ```release-note Examples to enable Istio run in docker environment by integrating Consul as a service registry. ``` moving #674 to this new PR so anyone can contribute to PR
…_go mention,...) (istio#675) * dev doc updates (working example, shorter vars, ./ in paths, bazel_to_go mention,...) Updates while going through the steps: Make the examples work (Fixes Issue istio#674 ) Shorter variables / no need to create the mixer directory, git clone does it Clearer and makes tab completion faster to use ./ in paths relative to current directory Mention of ./bin/bazel_to_go.py * Mention issue with kubeconfig and update info about string attribute * Hyperlink the file that needs edit Former-commit-id: 0d429685ab8f774e059398a9d73d777b1473a221
…_go mention,...) (#675) * dev doc updates (working example, shorter vars, ./ in paths, bazel_to_go mention,...) Updates while going through the steps: Make the examples work (Fixes Issue #674 ) Shorter variables / no need to create the mixer directory, git clone does it Clearer and makes tab completion faster to use ./ in paths relative to current directory Mention of ./bin/bazel_to_go.py * Mention issue with kubeconfig and update info about string attribute * Hyperlink the file that needs edit Former-commit-id: 794d54668edbcddbcc67a55067e47afb031408e8
* fix bug * bug fix in bug fix * minor
* watch Istio resources changes in istio-operator * fix test error * Review Comments * Fix e2e test failure * Fix e2e test failure * Fix e2e failure * debug e2e failure * debug operator e2e * debug e2e * debug e2e * debug e2e * remove e2e debug change
Release note:
Added consul with docker related Dockerfiles, build scripts, rule yamls, Consul readme, and docker-compose file for starting everything for that demo