diff --git a/Makefile b/Makefile index d466541..48a729c 100644 --- a/Makefile +++ b/Makefile @@ -49,3 +49,15 @@ clean: destroy-box remove-tmp update-box: @SSL_CERT_FILE=${SSL_CERT_FILE} CURL_CA_BUNDLE=${CURL_CA_BUNDLE} vagrant box update || (echo '\n\nIf you get an SSL error you might be behind a transparent proxy. \nMore info https://github.com/fredrikhgrelland/vagrant-hashistack/blob/master/README.md#if-you-are-behind-a-transparent-proxy\n\n' && exit 2) +# to-hivemetastore +proxy-h: + consul connect proxy -service hivemetastore-local -upstream hive-metastore:9083 -log-level debug +# to-minio +proxy-m: + consul connect proxy -service minio-local -upstream minio:9000 -log-level debug +# to-postgres +proxy-p: + consul connect proxy -service postgres-local -upstream postgres:5432 -log-level debug +# to-presto +proxy-p: + consul connect proxy -service postgres-local -upstream presto:8080 -log-level debug diff --git a/conf/nomad/presto.hcl b/conf/nomad/presto.hcl index 3b0e996..732cb79 100644 --- a/conf/nomad/presto.hcl +++ b/conf/nomad/presto.hcl @@ -1,6 +1,7 @@ -job "presto" { +job "${nomad_job_name}" { type = "service" - datacenters = ["dc1"] + datacenters = "${datacenters}" + namespace = "${namespace}" update { max_parallel = 1 @@ -21,18 +22,18 @@ job "presto" { } service { - name = "presto" - port = 8080 + name = "${service_name}" + port = "${port}" connect { sidecar_service { proxy { upstreams { - destination_name = "hive-metastore" - local_bind_port = 9083 + destination_name = "${hivemetastore_service_name}" + local_bind_port = "${hivemetastore_port}" } upstreams { - destination_name = "minio" - local_bind_port = 9000 + destination_name = "${minio_service_name}" + local_bind_port = "${minio_port}" } } } @@ -85,7 +86,7 @@ job "presto" { template { destination = "tmp/service.json" data = <