From 1b3d8c2bc68b0cde5f5d71e86e47c6bdbedae28b Mon Sep 17 00:00:00 2001 From: Matthos Denys Date: Sun, 7 Mar 2021 18:13:49 +0300 Subject: [PATCH] wait ip --- run.sh | 6 ++---- srcs/ftps/srcs/vsftpd.conf | 2 +- srcs/wp/Dockerfile | 2 +- srcs/wp/start.sh | 1 + srcs/yaml/ftps.yaml | 2 -- srcs/yaml/mariadb.yaml | 2 +- srcs/yaml/metallb.yaml | 2 +- srcs/yaml/wp.yaml | 8 +++----- 8 files changed, 10 insertions(+), 15 deletions(-) diff --git a/run.sh b/run.sh index c5006cf..154ab14 100644 --- a/run.sh +++ b/run.sh @@ -15,9 +15,7 @@ kubectl apply -f srcs/yaml/metallb.yaml kubectl apply -f srcs/yaml/nginx_service.yaml kubectl apply -f srcs/yaml/mariadb.yaml kubectl apply -f srcs/yaml/phpsvc.yaml -kubectl apply -f srcs/yaml/ftps.yaml kubectl apply -f srcs/yaml/wp.yaml +kubectl apply -f srcs/yaml/ftps.yaml -echo "Minikube IP: ${IP}" - -# sh minikubenewpc.sh sh ~/Desktop/ft_services/run.sh \ No newline at end of file +echo "Minikube IP: ${IP}" \ No newline at end of file diff --git a/srcs/ftps/srcs/vsftpd.conf b/srcs/ftps/srcs/vsftpd.conf index 054ed58..78f8318 100644 --- a/srcs/ftps/srcs/vsftpd.conf +++ b/srcs/ftps/srcs/vsftpd.conf @@ -11,6 +11,6 @@ seccomp_sandbox=NO rsa_cert_file=/etc/ssl/certs/vsftpd.crt rsa_private_key_file=/etc/ssl/private/vsftpd.key ssl_enable=YES -pasv_address=192.168.99.150 +pasv_address=192.168.99.100 pasv_min_port=30020 pasv_max_port=30021 \ No newline at end of file diff --git a/srcs/wp/Dockerfile b/srcs/wp/Dockerfile index 7f3c0a2..06b16a2 100755 --- a/srcs/wp/Dockerfile +++ b/srcs/wp/Dockerfile @@ -11,5 +11,5 @@ COPY supervisord.conf /etc/supervisord.conf COPY start.sh . RUN chmod +x start.sh EXPOSE 5050 +CMD ["/start.sh"] CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] -ENTRYPOINT sh start.sh \ No newline at end of file diff --git a/srcs/wp/start.sh b/srcs/wp/start.sh index 60fc464..0798fc2 100644 --- a/srcs/wp/start.sh +++ b/srcs/wp/start.sh @@ -2,6 +2,7 @@ openrc default /etc/init.d/mariadb setup rc-service mariadb start +/usr/bin/mysqld_safe & # curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar # chmod +x wp-cli.phar # mv wp-cli.phar /usr/local/bin/wp diff --git a/srcs/yaml/ftps.yaml b/srcs/yaml/ftps.yaml index d0cb870..5e6b318 100644 --- a/srcs/yaml/ftps.yaml +++ b/srcs/yaml/ftps.yaml @@ -26,8 +26,6 @@ spec: selector: app: ftps type: LoadBalancer - externalIPs: - - "192.168.99.150" --- apiVersion: apps/v1 kind: Deployment diff --git a/srcs/yaml/mariadb.yaml b/srcs/yaml/mariadb.yaml index 87b7d9e..b30f429 100644 --- a/srcs/yaml/mariadb.yaml +++ b/srcs/yaml/mariadb.yaml @@ -34,7 +34,7 @@ spec: resources: limits: memory: "128Mi" - cpu: "500m" + cpu: "100m" imagePullPolicy: Never ports: - containerPort: 3306 diff --git a/srcs/yaml/metallb.yaml b/srcs/yaml/metallb.yaml index 4de9d67..d6156e7 100755 --- a/srcs/yaml/metallb.yaml +++ b/srcs/yaml/metallb.yaml @@ -9,4 +9,4 @@ data: - name: default protocol: layer2 addresses: - - 192.168.99.150-192.168.99.200 \ No newline at end of file + - 192.168.99.100-192.168.99.200 \ No newline at end of file diff --git a/srcs/yaml/wp.yaml b/srcs/yaml/wp.yaml index e7e7add..694e360 100644 --- a/srcs/yaml/wp.yaml +++ b/srcs/yaml/wp.yaml @@ -12,8 +12,6 @@ spec: targetPort: 5050 selector: app: wp - externalIPs: - - "192.168.99.150" --- apiVersion: apps/v1 kind: Deployment @@ -57,11 +55,11 @@ metadata: spec: storageClassName: manual capacity: - storage: 800Mi + storage: 500Mi accessModes: - ReadWriteOnce hostPath: - path: "/var/www/" + path: "/var/www/localhost/htdocs/" claimRef: name: wp-pvc --- @@ -76,4 +74,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 800Mi \ No newline at end of file + storage: 500Mi \ No newline at end of file