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

Consul related Dockerfiles and rule yamls #674

Closed
wants to merge 4 commits into from
Closed

Consul related Dockerfiles and rule yamls #674

wants to merge 4 commits into from

Conversation

GregHanson
Copy link
Member

@GregHanson GregHanson commented Sep 5, 2017

Release note:

<PLEASE PUT RELEASE-NOTE HERE, PUT NONE if NO RELEASE-NOTE>

Added consul with docker related Dockerfiles, build scripts, rule yamls, Consul readme, and docker-compose file for starting everything for that demo

## Bookinfo Demo

The ingress controller is still under construction, rounting functionalities can be tested by curling a service container directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

s/rounting/routing/

Copy link
Contributor

@frankbu frankbu left a 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)

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

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

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.


Noted that Istio pilot is running inside each app container so as to coordinate Envoy and the service mesh.

## Prequisites
Copy link
Contributor

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

@andraxylia andraxylia Sep 6, 2017

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.

Copy link
Contributor

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

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Contributor

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

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.

Copy link
Member

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.

@andraxylia
Copy link
Contributor

/lgtm

@istio-merge-robot
Copy link

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@istio-merge-robot
Copy link

/lgtm cancel //PR changed after LGTM, removing LGTM. @GregHanson @andraxylia

Copy link
Member

@rshriram rshriram left a 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.

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

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}" \;
Copy link
Member

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

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

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?

@GregHanson
Copy link
Member Author

moving PR to #681

pushed to consul branch in istio/istio so anyone can contribute to the source as needed

@GregHanson GregHanson closed this Sep 6, 2017
@istio-testing
Copy link
Collaborator

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

Test name Commit Details Rerun command
prow/e2e-suite-rbac-no_auth.sh 94bb9ae link /test e2e-suite-rbac-no_auth
prow/e2e-suite-rbac-auth.sh 94bb9ae link /test e2e-suite-rbac-auth
prow/e2e-suite-no_rbac-auth.sh 94bb9ae link /test e2e-suite-no_rbac-auth
prow/e2e-suite-no_rbac-no_auth.sh 94bb9ae link /test e2e-suite-no_rbac-no_auth

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.

istio-merge-robot pushed a commit that referenced this pull request Sep 13, 2017
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
mandarjog pushed a commit to mandarjog/istio that referenced this pull request Oct 30, 2017
…_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
rshriram pushed a commit that referenced this pull request Oct 30, 2017
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

Former-commit-id: b83f3d7
mandarjog pushed a commit that referenced this pull request Oct 31, 2017
…_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
vbatts pushed a commit to vbatts/istio that referenced this pull request Oct 31, 2017
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 istio#674 to this new PR so anyone can contribute to PR

Former-commit-id: b83f3d7
mandarjog pushed a commit that referenced this pull request Oct 31, 2017
* fix bug

* bug fix in bug fix

* minor
mandarjog pushed a commit that referenced this pull request Nov 2, 2017
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

Former-commit-id: b83f3d7
howardjohn pushed a commit to howardjohn/istio that referenced this pull request Jan 12, 2020
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants