diff --git a/kael_abbott/Dockerfile b/kael_abbott/Dockerfile new file mode 100644 index 0000000..899ee6a --- /dev/null +++ b/kael_abbott/Dockerfile @@ -0,0 +1,2 @@ +FROM wordpress:latest + diff --git a/kael_abbott/README.md b/kael_abbott/README.md new file mode 100644 index 0000000..a64a2ff --- /dev/null +++ b/kael_abbott/README.md @@ -0,0 +1,48 @@ + + + + + +# DevOps-Applicants-Test + + + + +#### Instructions + +#### Commands + + +Inside the dir kael_abbott/ : + +- To run docker-compose.yaml: + + > docker-compose up -d + + + +- To run the kubernete files Inside the dir + kael_abbott/kubernete_files: + + > kubectl create -f 'filename.yaml' + +- To run the Dockerfile inside the dir kael_abbott/: + + > docker image build -t 'name' . + + + + +#### IP AWS CLOUD + +18.205.149.87 + +#### Username + +lowell + +##### Password + +q1twO3yl%AS6DAi0^KeoOX7% + + diff --git a/kael_abbott/docker-compose.yaml b/kael_abbott/docker-compose.yaml new file mode 100644 index 0000000..287623a --- /dev/null +++ b/kael_abbott/docker-compose.yaml @@ -0,0 +1,48 @@ +version: '3' + +services: + # Database + db: + image: mysql:5.7 + volumes: + - db_data:/var/lib/mysql + restart: always + environment: + MYSQL_ROOT_PASSWORD: password + MYSQL_DATABASE: wordpress + MYSQL_USER: wordpress + MYSQL_PASSWORD: wordpress + networks: + - wpsite + # phpmyadmin + phpmyadmin: + depends_on: + - db + image: phpmyadmin/phpmyadmin + restart: always + ports: + - '8080:80' + environment: + PMA_HOST: db + MYSQL_ROOT_PASSWORD: password + networks: + - wpsite + # Wordpress + wordpress: + depends_on: + - db + image: wordpress:latest + ports: + - '80:80' + restart: always + volumes: ['./:/var/www/html'] + environment: + WORDPRESS_DB_HOST: db:3306 + WORDPRESS_DB_USER: wordpress + WORDPRESS_DB_PASSWORD: wordpress + networks: + - wpsite +networks: + wpsite: +volumes: + db_data: \ No newline at end of file diff --git a/kael_abbott/kubernete files/db-data-persistentvolumeclaim.yaml b/kael_abbott/kubernete files/db-data-persistentvolumeclaim.yaml new file mode 100644 index 0000000..593d141 --- /dev/null +++ b/kael_abbott/kubernete files/db-data-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: db-data + name: db-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/kael_abbott/kubernete files/db-deployment.yaml b/kael_abbott/kubernete files/db-deployment.yaml new file mode 100644 index 0000000..f8a1fe9 --- /dev/null +++ b/kael_abbott/kubernete files/db-deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: db +spec: + selector: + matchLabels: + app: db + replicas: 1 + template: + metadata: + labels: + app: db + spec: + containers: + - env: + - name: MYSQL_DATABASE + value: wordpress + - name: MYSQL_PASSWORD + value: wordpress + - name: MYSQL_ROOT_PASSWORD + value: password + - name: MYSQL_USER + value: wordpress + image: mysql:5.7 + name: db + resources: {} + volumeMounts: + - mountPath: /var/lib/mysql + name: db-data + restartPolicy: Always + volumes: + - name: db-data + persistentVolumeClaim: + claimName: db-data +status: {} diff --git a/kael_abbott/kubernete files/phpmyadmin-deployment.yaml b/kael_abbott/kubernete files/phpmyadmin-deployment.yaml new file mode 100644 index 0000000..e060848 --- /dev/null +++ b/kael_abbott/kubernete files/phpmyadmin-deployment.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: phpmyadmin +spec: + selector: + matchLabels: + app: phpmyadmin + replicas: 1 + template: + metadata: + labels: + app: phpmyadmin + spec: + containers: + - env: + - name: MYSQL_ROOT_PASSWORD + value: password + - name: PMA_HOST + value: db + image: phpmyadmin/phpmyadmin + name: phpmyadmin + ports: + - containerPort: 80 + resources: {} + restartPolicy: Always +status: {} diff --git a/kael_abbott/kubernete files/phpmyadmin-service.yaml b/kael_abbott/kubernete files/phpmyadmin-service.yaml new file mode 100644 index 0000000..7c2f1b3 --- /dev/null +++ b/kael_abbott/kubernete files/phpmyadmin-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.19.0 (f63a961c) + creationTimestamp: null + labels: + io.kompose.service: phpmyadmin + name: phpmyadmin +spec: + ports: + - name: "8080" + port: 8080 + targetPort: 80 + selector: + io.kompose.service: phpmyadmin +status: + loadBalancer: {} diff --git a/kael_abbott/kubernete files/wordpress-claim0-persistentvolumeclaim.yaml b/kael_abbott/kubernete files/wordpress-claim0-persistentvolumeclaim.yaml new file mode 100644 index 0000000..ad57edc --- /dev/null +++ b/kael_abbott/kubernete files/wordpress-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: wordpress-claim0 + name: wordpress-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/kael_abbott/kubernete files/wordpress-deployment.yaml b/kael_abbott/kubernete files/wordpress-deployment.yaml new file mode 100644 index 0000000..7ba41bd --- /dev/null +++ b/kael_abbott/kubernete files/wordpress-deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wordpress +spec: + selector: + matchLabels: + app: wordpress + replicas: 1 + template: + metadata: + labels: + app: wordpress + spec: + containers: + - env: + - name: WORDPRESS_DB_HOST + value: db:3306 + - name: WORDPRESS_DB_PASSWORD + value: wordpress + - name: WORDPRESS_DB_USER + value: wordpress + image: wordpress:latest + name: wordpress + ports: + - containerPort: 80 + resources: {} + volumeMounts: + - mountPath: /var/www/html + name: wordpress-claim0 + restartPolicy: Always + volumes: + - name: wordpress-claim0 + persistentVolumeClaim: + claimName: wordpress-claim0 +status: {} diff --git a/kael_abbott/kubernete files/wordpress-service.yaml b/kael_abbott/kubernete files/wordpress-service.yaml new file mode 100644 index 0000000..fcab9fa --- /dev/null +++ b/kael_abbott/kubernete files/wordpress-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.19.0 (f63a961c) + creationTimestamp: null + labels: + io.kompose.service: wordpress + name: wordpress +spec: + ports: + - name: "80" + port: 80 + targetPort: 80 + selector: + io.kompose.service: wordpress +status: + loadBalancer: {}