From d05812e9d6eee92956cb55d57452a5c8788b93ce Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Sat, 29 Aug 2020 12:38:44 -0400 Subject: [PATCH] fix networking --- kustomize/bases/gitea/kustomization.yaml | 2 +- kustomize/bases/grafana/kustomization.yaml | 2 +- kustomize/bases/nextcloud/kustomization.yaml | 2 +- setup-dev-cluster.sh | 8 +++----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/kustomize/bases/gitea/kustomization.yaml b/kustomize/bases/gitea/kustomization.yaml index b777c76..932157a 100644 --- a/kustomize/bases/gitea/kustomization.yaml +++ b/kustomize/bases/gitea/kustomization.yaml @@ -7,7 +7,7 @@ secretGenerator: type: Opaque behavior: create literals: - - host=172.18.1.0:3306 + - host=mariadb-localhost:3306 - database=gitea - username=gitea - password=changeme diff --git a/kustomize/bases/grafana/kustomization.yaml b/kustomize/bases/grafana/kustomization.yaml index 63373a4..a88142f 100644 --- a/kustomize/bases/grafana/kustomization.yaml +++ b/kustomize/bases/grafana/kustomization.yaml @@ -12,7 +12,7 @@ secretGenerator: type: Opaque behavior: create literals: - - host=172.18.1.0:3306 + - host=mariadb-localhost:3306 - database=grafana - username=grafana - password=changeme diff --git a/kustomize/bases/nextcloud/kustomization.yaml b/kustomize/bases/nextcloud/kustomization.yaml index ff4055c..91d8416 100644 --- a/kustomize/bases/nextcloud/kustomization.yaml +++ b/kustomize/bases/nextcloud/kustomization.yaml @@ -8,7 +8,7 @@ secretGenerator: type: Opaque behavior: create literals: - - host=172.18.1.0:3306 + - host=mariadb-localhost:3306 - database=nextcloud - username=nextcloud - password=changeme diff --git a/setup-dev-cluster.sh b/setup-dev-cluster.sh index a08e95c..7d013cd 100755 --- a/setup-dev-cluster.sh +++ b/setup-dev-cluster.sh @@ -38,11 +38,11 @@ if ! docker ps -a | grep registry-localhost &>/dev/null; then docker volume create local_registry docker run -d \ --name registry-localhost \ + --net "k3d-$cluster_name" \ --volume local_registry:/var/lib/registry \ --restart always \ -p 5000:5000 \ registry:2 - docker network connect "k3d-$cluster_name" registry-localhost fi # local mariadb database @@ -50,13 +50,12 @@ if ! docker ps -a | grep mariadb-localhost &>/dev/null; then docker volume create local_mariadb docker run -d \ --name mariadb-localhost \ - --ip 172.18.1.0 \ + --net "k3d-$cluster_name" \ --volume local_mariadb:/var/lib/mysql \ --restart always \ --env MYSQL_ROOT_PASSWORD=changeme \ -p 3306:3306 \ mariadb:10.5 - docker network connect "k3d-$cluster_name" mariadb-localhost sleep 10 fi @@ -65,7 +64,7 @@ if ! docker ps -a | grep nfs-localhost &>/dev/null; then docker volume create local_nfs docker run -d \ --name nfs-localhost \ - --ip 172.18.1.1 \ + --net "k3d-$cluster_name" \ --volume nfs_local:/data \ --volume /lib/modules:/lib/modules:ro \ --restart always \ @@ -76,7 +75,6 @@ if ! docker ps -a | grep nfs-localhost &>/dev/null; then --env NFS_LOG_LEVEL=DEBUG \ -p 2049:2049 \ erichough/nfs-server:2.2.1 - docker network connect "k3d-$cluster_name" nfs-localhost sleep 10 fi