diff --git a/oj-pascale/wordpress-php-wordpress-aws-eks/README.md b/oj-pascale/wordpress-php-wordpress-aws-eks/README.md new file mode 100644 index 0000000..eafea94 --- /dev/null +++ b/oj-pascale/wordpress-php-wordpress-aws-eks/README.md @@ -0,0 +1,19 @@ +# wordpress-php-wordpress-aws-eks +Deploy Wordpress, Phpmyadmin with Mysql on AWS EKS +To deploy WordPress, phpMyAdmin, and MySQL on AWS EKS, you will need to follow these general steps: + +1. Set up an AWS EKS cluster. + +2. Install and configure kubectl. + +3. Deploy MySQL to the EKS cluster using a Kubernetes YAML file. + +4. Deploy phpMyAdmin to the EKS cluster using a Kubernetes YAML file. + +5. Deploy WordPress to the EKS cluster using a Kubernetes YAML file. + +6. Expose the WordPress service to the internet using an AWS Elastic Load Balancer. + +7. Configure the WordPress and phpMyAdmin installations by accessing them through their URLs. + +These steps involve creating and configuring Kubernetes YAML files, deploying pods, creating and configuring services, and configuring the AWS Elastic Load Balancer. The exact details of the steps will depend on the specific configuration and requirements of your deployment. diff --git a/oj-pascale/wordpress-php-wordpress-aws-eks/mysql-deployment.yaml b/oj-pascale/wordpress-php-wordpress-aws-eks/mysql-deployment.yaml new file mode 100644 index 0000000..edd77a3 --- /dev/null +++ b/oj-pascale/wordpress-php-wordpress-aws-eks/mysql-deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: Service +metadata: + name: wordpress-mysql + labels: + app: wordpress +spec: + ports: + - port: 3306 + selector: + app: wordpress + tier: mysql + clusterIP: None +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wordpress-mysql + labels: + app: wordpress +spec: + selector: + matchLabels: + app: wordpress + tier: mysql + strategy: + type: Recreate + template: + metadata: + labels: + app: wordpress + tier: mysql + spec: + containers: + - image: mysql:5.6 + name: mysql + env: + - name: MYSQL_DATABASE + value: wordpress + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: root_password + - name: PMA_USER + valueFrom: + secretKeyRef: + name: mysql-secrets + key: username + - name: PMA_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: password + ports: + - containerPort: 3306 + name: mysql diff --git a/oj-pascale/wordpress-php-wordpress-aws-eks/phpmyadmin.yaml b/oj-pascale/wordpress-php-wordpress-aws-eks/phpmyadmin.yaml new file mode 100644 index 0000000..e6cb66c --- /dev/null +++ b/oj-pascale/wordpress-php-wordpress-aws-eks/phpmyadmin.yaml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: Service +metadata: + name: php-myadmin + labels: + app: phpmyadmin +spec: + type: LoadBalancer + selector: + app: phpmyadmin + ports: + - name: http + port: 8080 + targetPort: 80 + nodePort: 30000 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: phpmyadmin +spec: + selector: + matchLabels: + app: phpmyadmin + replicas: 1 + template: + metadata: + labels: + app: phpmyadmin + spec: + containers: + - name: phpmyadmin + image: phpmyadmin/phpmyadmin + env: + - name: PMA_HOST + value: wordpress-mysql + - name: PMA_USER + value: root + - name: PMA_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: root_password + ports: + - containerPort: 80 diff --git a/oj-pascale/wordpress-php-wordpress-aws-eks/wordpress-deployment.yaml b/oj-pascale/wordpress-php-wordpress-aws-eks/wordpress-deployment.yaml new file mode 100644 index 0000000..62d3364 --- /dev/null +++ b/oj-pascale/wordpress-php-wordpress-aws-eks/wordpress-deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: Service +metadata: + name: wordpress-service +spec: + type: LoadBalancer + selector: + app: wordpress + ports: + - name: wordpress + port: 80 + targetPort: 80 + nodePort: 30100 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wordpress + labels: + app: wordpress +spec: + replicas: 1 + selector: + matchLabels: + app: wordpress + template: + metadata: + labels: + app: wordpress + spec: + containers: + - name: wordpress + image: wordpress:latest + env: + - name: WORDPRESS_DB_HOST + value: wordpress-mysql + - name: WORDPRESS_DB_USER + value: root + - name: WORDPRESS_DB_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: root_password + ports: + - containerPort: 80 + name: wordpress diff --git a/pascale-oj/wordpress-php-wordpress-aws-eks/README.md b/pascale-oj/wordpress-php-wordpress-aws-eks/README.md new file mode 100644 index 0000000..eafea94 --- /dev/null +++ b/pascale-oj/wordpress-php-wordpress-aws-eks/README.md @@ -0,0 +1,19 @@ +# wordpress-php-wordpress-aws-eks +Deploy Wordpress, Phpmyadmin with Mysql on AWS EKS +To deploy WordPress, phpMyAdmin, and MySQL on AWS EKS, you will need to follow these general steps: + +1. Set up an AWS EKS cluster. + +2. Install and configure kubectl. + +3. Deploy MySQL to the EKS cluster using a Kubernetes YAML file. + +4. Deploy phpMyAdmin to the EKS cluster using a Kubernetes YAML file. + +5. Deploy WordPress to the EKS cluster using a Kubernetes YAML file. + +6. Expose the WordPress service to the internet using an AWS Elastic Load Balancer. + +7. Configure the WordPress and phpMyAdmin installations by accessing them through their URLs. + +These steps involve creating and configuring Kubernetes YAML files, deploying pods, creating and configuring services, and configuring the AWS Elastic Load Balancer. The exact details of the steps will depend on the specific configuration and requirements of your deployment. diff --git a/pascale-oj/wordpress-php-wordpress-aws-eks/mysql-deployment.yaml b/pascale-oj/wordpress-php-wordpress-aws-eks/mysql-deployment.yaml new file mode 100644 index 0000000..edd77a3 --- /dev/null +++ b/pascale-oj/wordpress-php-wordpress-aws-eks/mysql-deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: v1 +kind: Service +metadata: + name: wordpress-mysql + labels: + app: wordpress +spec: + ports: + - port: 3306 + selector: + app: wordpress + tier: mysql + clusterIP: None +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wordpress-mysql + labels: + app: wordpress +spec: + selector: + matchLabels: + app: wordpress + tier: mysql + strategy: + type: Recreate + template: + metadata: + labels: + app: wordpress + tier: mysql + spec: + containers: + - image: mysql:5.6 + name: mysql + env: + - name: MYSQL_DATABASE + value: wordpress + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: root_password + - name: PMA_USER + valueFrom: + secretKeyRef: + name: mysql-secrets + key: username + - name: PMA_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: password + ports: + - containerPort: 3306 + name: mysql diff --git a/pascale-oj/wordpress-php-wordpress-aws-eks/phpmyadmin.yaml b/pascale-oj/wordpress-php-wordpress-aws-eks/phpmyadmin.yaml new file mode 100644 index 0000000..e6cb66c --- /dev/null +++ b/pascale-oj/wordpress-php-wordpress-aws-eks/phpmyadmin.yaml @@ -0,0 +1,45 @@ +apiVersion: v1 +kind: Service +metadata: + name: php-myadmin + labels: + app: phpmyadmin +spec: + type: LoadBalancer + selector: + app: phpmyadmin + ports: + - name: http + port: 8080 + targetPort: 80 + nodePort: 30000 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: phpmyadmin +spec: + selector: + matchLabels: + app: phpmyadmin + replicas: 1 + template: + metadata: + labels: + app: phpmyadmin + spec: + containers: + - name: phpmyadmin + image: phpmyadmin/phpmyadmin + env: + - name: PMA_HOST + value: wordpress-mysql + - name: PMA_USER + value: root + - name: PMA_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: root_password + ports: + - containerPort: 80 diff --git a/pascale-oj/wordpress-php-wordpress-aws-eks/wordpress-deployment.yaml b/pascale-oj/wordpress-php-wordpress-aws-eks/wordpress-deployment.yaml new file mode 100644 index 0000000..62d3364 --- /dev/null +++ b/pascale-oj/wordpress-php-wordpress-aws-eks/wordpress-deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: Service +metadata: + name: wordpress-service +spec: + type: LoadBalancer + selector: + app: wordpress + ports: + - name: wordpress + port: 80 + targetPort: 80 + nodePort: 30100 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wordpress + labels: + app: wordpress +spec: + replicas: 1 + selector: + matchLabels: + app: wordpress + template: + metadata: + labels: + app: wordpress + spec: + containers: + - name: wordpress + image: wordpress:latest + env: + - name: WORDPRESS_DB_HOST + value: wordpress-mysql + - name: WORDPRESS_DB_USER + value: root + - name: WORDPRESS_DB_PASSWORD + valueFrom: + secretKeyRef: + name: mysql-secrets + key: root_password + ports: + - containerPort: 80 + name: wordpress diff --git a/pascale/maven.txt b/pascale/maven.txt index 1e66d27..e3e42c0 100644 --- a/pascale/maven.txt +++ b/pascale/maven.txt @@ -10,5 +10,5 @@ The java compilation is not compulsory for the Gradle tool. On the contrary, Jav The Gradle tool is new, hence the users of this tool are limited. The Maven tool is a well-known tool that makes the tool easily available for developers to design new projects. In terms of execution of project, the performance of Gradle is very fast and efficient. It is around two times in speed to that of Maven. - +###End###