grafana
This commit is contained in:
parent
45bf00dba9
commit
3671d4b6a6
2
run.sh
2
run.sh
@ -10,6 +10,7 @@ docker build -t phpmyadmin_image srcs/phpmyadmin
|
||||
docker build -t mariadb-image srcs/mariadb
|
||||
docker build -t my_ftps srcs/ftps
|
||||
docker build -t wp-image srcs/wp
|
||||
docker build -t grafana-image srcs/grafana
|
||||
|
||||
kubectl apply -f srcs/yaml/metallb.yaml
|
||||
kubectl apply -f srcs/yaml/nginx_service.yaml
|
||||
@ -17,5 +18,6 @@ kubectl apply -f srcs/yaml/mariadb.yaml
|
||||
kubectl apply -f srcs/yaml/phpsvc.yaml
|
||||
kubectl apply -f srcs/yaml/wp.yaml
|
||||
kubectl apply -f srcs/yaml/ftps.yaml
|
||||
kubectl apply -f srcs/yaml/grafana.yaml
|
||||
|
||||
echo "Minikube IP: ${IP}"
|
||||
@ -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.166
|
||||
pasv_min_port=30020
|
||||
pasv_max_port=30021
|
||||
BIN
srcs/grafana/.DS_Store
vendored
Executable file
BIN
srcs/grafana/.DS_Store
vendored
Executable file
Binary file not shown.
15
srcs/grafana/Dockerfile
Executable file
15
srcs/grafana/Dockerfile
Executable file
@ -0,0 +1,15 @@
|
||||
FROM alpine:3.12
|
||||
LABEL maintainer="mdenys"
|
||||
RUN apk update
|
||||
RUN apk add supervisor nginx php7 php7-fpm php7-opcache php7-gd php7-mysqli php7-zlib php7-curl php7-mbstring php7-json php7-session mysql openssl
|
||||
RUN mkdir -p /var/www/localhost/htdocs/
|
||||
RUN mkdir -p /run/php7
|
||||
RUN mkdir -p /run/nginx
|
||||
RUN mkdir /etc/nginx/ssl
|
||||
RUN openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out /etc/nginx/ssl/html.pem -keyout /etc/nginx/ssl/html.key -subj "/C=RU/ST=Kazan/L=Kazan/O=21 School/OU=mdenys/CN=html"
|
||||
RUN mkdir -p /var/www/localhost/htdocs/tmp
|
||||
RUN chmod 777 /var/www/localhost/htdocs/tmp
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY supervisord.conf /etc/supervisord.conf
|
||||
EXPOSE 5000
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||
14
srcs/grafana/index.html
Executable file
14
srcs/grafana/index.html
Executable file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-sm"><h1 class="display-1">phpmyadmin</h1></div>
|
||||
<?php echo phpinfo();?>
|
||||
</body>
|
||||
</html>
|
||||
16
srcs/grafana/nginx.conf
Executable file
16
srcs/grafana/nginx.conf
Executable file
@ -0,0 +1,16 @@
|
||||
server {
|
||||
listen 0.0.0.0:3000 ssl default_server;
|
||||
server_name localhost;
|
||||
ssl_certificate /etc/nginx/ssl/html.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/html.key;
|
||||
root /var/www/localhost/htdocs/;
|
||||
autoindex on;
|
||||
index index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
}
|
||||
1173
srcs/grafana/php.ini
Executable file
1173
srcs/grafana/php.ini
Executable file
File diff suppressed because it is too large
Load Diff
7
srcs/grafana/supervisord.conf
Executable file
7
srcs/grafana/supervisord.conf
Executable file
@ -0,0 +1,7 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
[program:php]
|
||||
command= /usr/sbin/php-fpm7
|
||||
[program:nginx]
|
||||
command=sh -c "nginx -g 'daemon off;' && kill -s SIGTERM $(cat supervisord.pid)"
|
||||
BIN
srcs/influxdb/.DS_Store
vendored
Executable file
BIN
srcs/influxdb/.DS_Store
vendored
Executable file
Binary file not shown.
15
srcs/influxdb/Dockerfile
Executable file
15
srcs/influxdb/Dockerfile
Executable file
@ -0,0 +1,15 @@
|
||||
FROM alpine:3.12
|
||||
LABEL maintainer="mdenys"
|
||||
RUN apk update
|
||||
RUN apk add supervisor nginx php7 php7-fpm php7-opcache php7-gd php7-mysqli php7-zlib php7-curl php7-mbstring php7-json php7-session mysql openssl
|
||||
RUN mkdir -p /var/www/localhost/htdocs/
|
||||
RUN mkdir -p /run/php7
|
||||
RUN mkdir -p /run/nginx
|
||||
RUN mkdir /etc/nginx/ssl
|
||||
RUN openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out /etc/nginx/ssl/html.pem -keyout /etc/nginx/ssl/html.key -subj "/C=RU/ST=Kazan/L=Kazan/O=21 School/OU=mdenys/CN=html"
|
||||
RUN mkdir -p /var/www/localhost/htdocs/tmp
|
||||
RUN chmod 777 /var/www/localhost/htdocs/tmp
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY supervisord.conf /etc/supervisord.conf
|
||||
EXPOSE 5000
|
||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||
14
srcs/influxdb/index.html
Executable file
14
srcs/influxdb/index.html
Executable file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-sm"><h1 class="display-1">phpmyadmin</h1></div>
|
||||
<?php echo phpinfo();?>
|
||||
</body>
|
||||
</html>
|
||||
16
srcs/influxdb/nginx.conf
Executable file
16
srcs/influxdb/nginx.conf
Executable file
@ -0,0 +1,16 @@
|
||||
server {
|
||||
listen 0.0.0.0:3000 ssl default_server;
|
||||
server_name localhost;
|
||||
ssl_certificate /etc/nginx/ssl/html.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/html.key;
|
||||
root /var/www/localhost/htdocs/;
|
||||
autoindex on;
|
||||
index index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
}
|
||||
1173
srcs/influxdb/php.ini
Executable file
1173
srcs/influxdb/php.ini
Executable file
File diff suppressed because it is too large
Load Diff
7
srcs/influxdb/supervisord.conf
Executable file
7
srcs/influxdb/supervisord.conf
Executable file
@ -0,0 +1,7 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
[program:php]
|
||||
command= /usr/sbin/php-fpm7
|
||||
[program:nginx]
|
||||
command=sh -c "nginx -g 'daemon off;' && kill -s SIGTERM $(cat supervisord.pid)"
|
||||
@ -25,11 +25,11 @@ http {
|
||||
}
|
||||
|
||||
location = ^(/phpmyadmin)$ {
|
||||
proxy_pass https://192.168.99.150:5000/$1;
|
||||
proxy_pass https://192.168.99.166:5000/$1;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
proxy_pass https://192.168.99.150:5000/;
|
||||
proxy_pass https://192.168.99.166:5000/;
|
||||
proxy_redirect /index.php /phpmyadmin/index.php;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ rc-service mariadb start
|
||||
cd /var/www/localhost/htdocs/
|
||||
wp core download --allow-root --quiet
|
||||
wp core config --allow-root --dbname=wp_db --dbuser=mdenys --dbpass=mdenys --dbhost=mariadb-service --dbprefix=wp_ --quiet
|
||||
wp core install --allow-root --url="http://192.168.99.150:5050" --title="ecole 21" --admin_user="admin" --admin_password="123456" --admin_email="denis.nadey@gmail.com" --quiet
|
||||
wp core install --allow-root --url="http://192.168.99.166:5050" --title="ecole 21" --admin_user="admin" --admin_password="123456" --admin_email="denis.nadey@gmail.com" --quiet
|
||||
wp user create bob bob@example.com --role=author --allow-root --quiet
|
||||
wp user create bob2 bob2@example.com --role=author --allow-root --quiet
|
||||
wp user create bob3 bob3@example.com --role=author --allow-root --quiet
|
||||
|
||||
@ -10,6 +10,7 @@ spec:
|
||||
ports:
|
||||
- name: data
|
||||
port: 20
|
||||
protocol: TCP
|
||||
- name: ftps
|
||||
port: 21
|
||||
protocol: TCP
|
||||
|
||||
34
srcs/yaml/grafana.yaml
Executable file
34
srcs/yaml/grafana.yaml
Executable file
@ -0,0 +1,34 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana-service
|
||||
annotations:
|
||||
metallb.universe.tf/allow-shared-ip: minikube
|
||||
spec:
|
||||
selector:
|
||||
app: grafana
|
||||
ports:
|
||||
- name: https
|
||||
protocol: TCP
|
||||
port: 3000
|
||||
type: LoadBalancer
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: grafana-deployment
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
containers:
|
||||
- name: grafana
|
||||
imagePullPolicy: Never
|
||||
image: grafana_image
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
@ -9,4 +9,4 @@ data:
|
||||
- name: default
|
||||
protocol: layer2
|
||||
addresses:
|
||||
- 192.168.99.150-192.168.99.200
|
||||
- 192.168.99.166-192.168.99.200
|
||||
Loading…
x
Reference in New Issue
Block a user