-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: upgrade to fabio 1.5.13 * fix: missing terraform 0.12. migration * chore: update to terraform_aws_consul module 0.7.3 * refactor: removed obsolete supervisor support * refactor: making SSH key creation for tests configurable * refactor: moved AMI cleanup into helper, making SSH cleanup configurable * chore: upgrade to nomad 0.10.2, consul 1.6.2, tf consul 0.7.3 Upgrading the terraform module of consul includes refactoring to support change to systemd init system. * chore: update terratest dependencies * doc: Add information to monitor nomad servers and nodes * chore: cleanup install script * chore: cleanup merge leftover * feat: AMI with Consul Connect Support - UNTESTED In order to support Consul Connect the CNI plugins must be installed. They seem to provide the networking capabilities: bridge. AMI can be build and starts up a cluster, but functionality of the bridge network inside of nomad was not tested. * doc: Consul Connect demo - NOT WORKING Following the tutorial referenced in the README.md and trying to setup. This example requires the CNI enabled AMI. * feat: added make target for CNI AMI Command to execute CNI AMI creation: - make -f ./modules/ami2/Makefile nomad-consul-docker-ecr-cni.json * chore: removed tflint tflint was removed as dependency and should be introduced with a separate PR. * chore: added cni into AMI naming Making content of AMI more explicit with extending the name and the used version of the CNI plugins. Co-authored-by: Matthias Scholz <[email protected]>
- Loading branch information
1 parent
688653b
commit ff36b0d
Showing
29 changed files
with
545 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Usage Example: Consul Connect - NOT WORKING | ||
|
||
This folder provides an example on how to use Consul Connect in the cluster. | ||
It is derived from the this [tutorial](https://www.hashicorp.com/blog/consul-connect-integration-in-hashicorp-nomad/). | ||
|
||
## !!! Errors !!! | ||
|
||
Image: https://console.cloud.google.com/gcr/images/google-containers/GLOBAL/pause-amd64@sha256:163ac025575b775d1c0f9bf0bdd0f086883171eb475b5068e7defa4ca9e76516/details?tab=info | ||
|
||
Local Pull Working: | ||
- `docker pull gcr.io/google-containers/pause-amd64:3.0` | ||
|
||
""" | ||
failed to setup alloc: | ||
pre-run hook "network" failed: | ||
failed to create network for alloc: | ||
Failed to pull `gcr.io/google_containers/pause-amd64:3.0`: | ||
API error (500): | ||
Get https://gcr.io/v2/: -> Google Container Registry | ||
net/http: | ||
request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) | ||
""" | ||
|
||
### State of Investigation | ||
|
||
Reason currently unclear. Further debugging necessary. | ||
|
||
Checked: | ||
- docker.config - ecr helper only limited to amazon, | ||
-> all other Docker registries should be supported as well. | ||
- Security Group Configuration - outbound traffic for nodes in private datacenter fully open | ||
|
||
## Usage | ||
|
||
This usage example was tested with `examples/root-example/README.md`. | ||
|
||
- `nomad run api_service.nomad` | ||
- `nomad run dashboard_service.nomad` | ||
|
||
- `curl ???` | ||
|
||
### Prerequisits | ||
|
||
- consul >=1.6 | ||
- CNI plugins installed on the instance | ||
|
||
### Limitations | ||
- [Consul Connect Native](https://www.consul.io/docs/connect/native.html) is not yet supported. | ||
- -> Integration into the application without sidecar not usable. | ||
- Consul Connect HTTP and gRPC checks are not yet supported. | ||
- -> No [health check](https://www.consul.io/docs/agent/checks.html) support. | ||
- -> __Fabio usage unclear__. | ||
- [Consul ACLs](https://learn.hashicorp.com/consul/security-networking/production-acls) are not yet supported. | ||
- -> No additional access management only network separation. | ||
- __Variable interpolation for group services and checks are not yet supported.__ ??? | ||
|
||
## Background | ||
|
||
- envoy via [Docker](https://hub.docker.com/r/envoyproxy/envoy) | ||
|
||
> Hashicorp: | ||
> Prior to Nomad 0.10, Nomad’s networking model running all applications in _host networking mode_. | ||
> Applications running on the same host could communicate with each other over localhost! | ||
> | ||
> Nomad 0.10 introduces network namespace support. | ||
> This is a new network model within Nomad | ||
> where task groups are a single network endpoint and | ||
> share a network namespace. | ||
### Job Specification | ||
|
||
- `connect` | ||
- `sidecar_service` | ||
|
||
#### network stanza - New Networking Modes | ||
|
||
- _none_ | ||
- isolated network without any network interfaces | ||
- ___bridge__ | ||
- isolated network namespace with an interface that is bridged with the host | ||
- _host_ | ||
- join the host network namespace and a shared network namespace is not created. | ||
- _This matches the behavior in Nomad 0.9_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
job "countdash" { | ||
datacenters = ["private-services"] | ||
|
||
group "api" { | ||
network { | ||
mode = "bridge" | ||
} | ||
|
||
service { | ||
name = "count-api" | ||
port = "9001" | ||
|
||
connect { | ||
sidecar_service {} | ||
} | ||
} | ||
|
||
task "web" { | ||
driver = "docker" | ||
config { | ||
image = "hashicorpnomad/counter-api:v1" | ||
} | ||
} | ||
} | ||
|
||
group "dashboard" { | ||
network { | ||
mode ="bridge" | ||
port "http" { | ||
static = 9002 | ||
to = 9002 | ||
} | ||
} | ||
|
||
service { | ||
name = "count-dashboard" | ||
port = "9002" | ||
|
||
tags = ["urlprefix-/dashboard"] # fabio | ||
|
||
connect { | ||
sidecar_service { | ||
proxy { | ||
upstreams { | ||
destination_name = "count-api" | ||
local_bind_port = 8080 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task "dashboard" { | ||
driver = "docker" | ||
env { | ||
COUNTING_SERVICE_URL = "http://${NOMAD_UPSTREAM_ADDR_count_api}" | ||
} | ||
config { | ||
image = "hashicorpnomad/counter-dashboard:v1" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.