Skip to content

Commit

Permalink
Merge pull request 'discovery port name seperator from' (#40) from ch…
Browse files Browse the repository at this point in the history
…angeportname into master

Reviewed-on: https://gitea:3000/AVENTER/mesos-compose/pulls/40
  • Loading branch information
Andreas Peters committed Sep 11, 2023
2 parents 4ed5caa + 4c48301 commit d34a183
Show file tree
Hide file tree
Showing 13 changed files with 585 additions and 538 deletions.
2 changes: 1 addition & 1 deletion .version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{ "version":"v0.4.2", "builddate":"2023-08-01T06:54:08Z" }]
[{ "version":"v0.4.2", "builddate":"2023-08-25T21:20:56Z" }]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ services:
labels:
traefik.enable: "true"
traefik.http.routers.test.entrypoints: "web"
traefik.http.routers.test.service: "mc:test:app1:80" # if an alternative taskname is set, we have to use it here to
traefik.http.routers.test.service: "mc_test_app1_80" # if an alternative taskname is set, we have to use it here to
traefik.http.routers.test.rule: "HostRegexp(`example.com`, `{subdomain:[a-z]+}.example.com`)"
network_mode: "BRIDGE"
ports:
Expand Down
2 changes: 1 addition & 1 deletion api/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func (e *API) getDiscoveryInfoPorts(cmd cfg.Command) []mesosproto.Port {
for i, c := range cmd.DockerPortMappings {
var tmpport mesosproto.Port
p := func() *string { x := cmd.TaskName + ":" + strconv.FormatUint(uint64(c.ContainerPort), 10); return &x }()
tmpport.Name = p
tmpport.Name = func() *string { x := strings.ReplaceAll(*p, ":", "_"); return &x }()
tmpport.Number = c.HostPort
tmpport.Protocol = c.Protocol

Expand Down
22 changes: 22 additions & 0 deletions docs/example/fetch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3.9'
services:
test1:
image: docker.io/avhost/docker-lighttpd
ports:
- "9999:8888/http"
network_mode: "bridge"
hostname: test.weave.local
network: default
restart: always
deploy:
replicas: 1
mesos:
fetch:
- value: https://downloads.mesosphere.com:8443/Dockerfile
executable: false

networks:
default:
external: true
name: weave

2 changes: 1 addition & 1 deletion docs/example/mesos-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
labels:
traefik.enable: "true"
traefik.http.routers.test.entrypoints: "web"
traefik.http.routers.test.service: "mc:test:app1:80" # if an alternative taskname is set, we have to use it here to
traefik.http.routers.test.service: "mc_test_app1_80" # if an alternative taskname is set, we have to use it here to
traefik.http.routers.test.rule: "HostRegexp(`example.com`, `{subdomain:[a-z]+}.example.com`)"
network_mode: "BRIDGE"
ports:
Expand Down
11 changes: 11 additions & 0 deletions docs/example/mesos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.9'
services:
test1:
image: avhost/docker-lighttpd
container_type: mesos

networks:
default:
external: true
name: weave

6 changes: 3 additions & 3 deletions docs/example/opensearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ services:
bootstrap.memory_lock: false # along with the memlock settings below, disables swapping
discovery.seed_hosts: opensearch-node1.mini,opensearch-node2.mini
cluster.initial_master_nodes: opensearch-node1.mini,opensearch-node2.mini
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
DISABLE_INSTALL_DEMO_CONFIG: true" # disables execution of install_demo_configuration.sh bundled with security plugin, which installs demo certificates and security configurations to OpenSearch
DISABLE_SECURITY_PLUGIN: true" # disables security plugin entirely in OpenSearch by setting plugins.security.disabled: true in opensearch.yml
OPENSEARCH_JAVA_OPTS: -Xms512m -Xmx512m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
DISABLE_INSTALL_DEMO_CONFIG: true # disables execution of install_demo_configuration.sh bundled with security plugin, which installs demo certificates and security configurations to OpenSearch
DISABLE_SECURITY_PLUGIN: true # disables security plugin entirely in OpenSearch by setting plugins.security.disabled: true in opensearch.yml
ulimits:
memlock:
soft: -1
Expand Down
2 changes: 1 addition & 1 deletion docs/example/test-extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
traefik.enable: "true"
traefik.http.routers.test1.entrypoints: "web"
traefik.http.routers.test1.rule: "Host(`www.example.com`)"
traefik.http.routers.test1.service: "mc:homepages:test1:8888"
traefik.http.routers.test1.service: "mc_homepages_test1_8888"
traefik.http.services.test1.loadBalancer.healthCheck.path: "/index.html"
traefik.http.services.test1.loadBalancer.healthCheck.interval: "10s"
traefik.http.services.test1.loadBalancer.healthCheck.timeout: "3s"
Expand Down
2 changes: 1 addition & 1 deletion docs/example/test-h2c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
traefik.enable: "true"
traefik.http.routers.test1.entrypoints: "web"
traefik.http.routers.test1.rule: "Host(`www.example.com`)"
traefik.http.routers.test1.service: "mc:test:test1:8888"
traefik.http.routers.test1.service: "mc.test_test1:8888"
network: default
restart: always

Expand Down
4 changes: 2 additions & 2 deletions docs/example/test-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ services:
labels:
traefik.enable: "true"
traefik.http.routers.test1.entrypoints: "web"
traefik.http.routers.test1.rule: "Host(`www.blub.com`)"
traefik.http.routers.test1.service: "mc:test:test1:8888"
traefik.http.routers.test1.rule: "Host(`your.example.com`)"
traefik.http.routers.test1.service: "mc_test_test1_8888"
traefik.http.services.test1.loadBalancer.healthCheck.path: "/index.html"
traefik.http.services.test1.loadBalancer.healthCheck.interval: "10s"
traefik.http.services.test1.loadBalancer.healthCheck.timeout: "3s"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
labels:
traefik.enable: "true"
traefik.http.routers.test.entrypoints: "web"
traefik.http.routers.test.service: "mc:test:app1:80" # if an alternative taskname is set, we have to use it here to
traefik.http.routers.test.service: "mc_test_app1_80" # if an alternative taskname is set, we have to use it here to
traefik.http.routers.test.rule: "HostRegexp(`example.com`, `{subdomain:[a-z]+}.example.com`)"
network_mode: "BRIDGE"
ports:
Expand Down
Loading

0 comments on commit d34a183

Please sign in to comment.