From 9c41215bfe20dfd4ac0a8f9daee37a768850a2d0 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:01:03 +0530 Subject: [PATCH 01/23] updated jenkins installation steps --- Jenkins/Jenkins_Installation.MD | 36 ++++++++------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/Jenkins/Jenkins_Installation.MD b/Jenkins/Jenkins_Installation.MD index 2a6adb9a..ff618744 100644 --- a/Jenkins/Jenkins_Installation.MD +++ b/Jenkins/Jenkins_Installation.MD @@ -6,41 +6,22 @@ Jenkins is a self-contained Java-based program, ready to run out-of-the-box, wit 1. EC2 Instance - With Internet Access - Security Group with Port `8080` open for internet -1. Java v1.8.x +1. Java 11 should be installed -## Install Java -1. We will be using open java for our demo, Get the latest version from http://openjdk.java.net/install/ - ```sh - yum install java-1.8* - #yum -y install java-1.8.0-openjdk-devel - ``` - -1. Confirm Java Version and set the java home - ```sh - java -version - find /usr/lib/jvm/java-1.8* | head -n 3 - JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk- - export JAVA_HOME - PATH=$PATH:$JAVA_HOME - # To set it permanently update your .bash_profile - vi ~/.bash_profile - ``` - _The output should be something like this,_ - ```sh - [root@~]# java -version - openjdk version "1.8.0_151" - OpenJDK Runtime Environment (build 1.8.0_151-b12) - OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode) - ``` ## Install Jenkins You can install jenkins using the rpm or by setting up the repo. We will set up the repo so that we can update it easily in the future. 1. Get the latest version of jenkins from https://pkg.jenkins.io/redhat-stable/ and install ```sh - yum -y install wget sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key - yum -y install jenkins + amazon-linux-extras install epel + amazon-linux-extras install java-openjdk11 + + #on RedHat/CentOs + #yum install epel-release # repository that provides 'daemonize' + #yum install java-11-openjdk-devel + #yum install jenkins ``` ### Start Jenkins @@ -77,4 +58,3 @@ Jenkins is a self-contained Java-based program, ready to run out-of-the-box, wit 1. Save your job 1. Build job 1. Check "console output" - From 47aa562639bef72d36f9842b359d22a1335ad1d5 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:05:15 +0530 Subject: [PATCH 02/23] Update Jenkins_Installation.MD --- Jenkins/Jenkins_Installation.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkins/Jenkins_Installation.MD b/Jenkins/Jenkins_Installation.MD index ff618744..7c16b8eb 100644 --- a/Jenkins/Jenkins_Installation.MD +++ b/Jenkins/Jenkins_Installation.MD @@ -1,6 +1,7 @@ # Install Jenkins on AWS EC2 Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems. As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project. +[Follow this artical through a video](https://youtu.be/ERR7cqW28FY) ### Prerequisites 1. EC2 Instance From 642727cd9fea66f467f0ea8bcef4415461eaa555 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Wed, 20 Oct 2021 22:05:47 +0530 Subject: [PATCH 03/23] Update Jenkins_Installation.MD --- Jenkins/Jenkins_Installation.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkins/Jenkins_Installation.MD b/Jenkins/Jenkins_Installation.MD index 7c16b8eb..773a9790 100644 --- a/Jenkins/Jenkins_Installation.MD +++ b/Jenkins/Jenkins_Installation.MD @@ -1,7 +1,7 @@ # Install Jenkins on AWS EC2 Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems. As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project. -[Follow this artical through a video](https://youtu.be/ERR7cqW28FY) +### Follow this artical [On YouTube Channel](https://youtu.be/ERR7cqW28FY) ### Prerequisites 1. EC2 Instance From f3f824cb34d539d54f7616db6b9e156138db578f Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Sun, 7 Nov 2021 13:38:02 +0530 Subject: [PATCH 04/23] Update tomcat_installation.MD --- Tomcat/tomcat_installation.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tomcat/tomcat_installation.MD b/Tomcat/tomcat_installation.MD index e614d0e7..5c39848b 100644 --- a/Tomcat/tomcat_installation.MD +++ b/Tomcat/tomcat_installation.MD @@ -2,7 +2,7 @@ - Follow this video lecture in Valaxy Technologies **[YouTube Channel](https://youtu.be/68WNroQBUts)** - Complete DevOps Project course on [Udemy](https://www.udemy.com/course/valaxy-devops/?referralCode=8147A5CF4C8C7D9E253F) ### Pre-requisites -1. EC2 instance with Java v1.8.x +1. EC2 instance with Java 11 ### Install Apache Tomcat 1. Download tomcat packages from https://tomcat.apache.org/download-80.cgi onto /opt on EC2 instance > Note: Make sure you change `` with the tomcat version which you download. From 0310003aa52448672bcffc362d9792b022b0f301 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Mon, 8 Nov 2021 14:22:32 +0530 Subject: [PATCH 05/23] Create dockerfile_instructions.md file --- Docker/Dockerfile_Instructions.md | 79 +++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 Docker/Dockerfile_Instructions.md diff --git a/Docker/Dockerfile_Instructions.md b/Docker/Dockerfile_Instructions.md new file mode 100644 index 00000000..463d4474 --- /dev/null +++ b/Docker/Dockerfile_Instructions.md @@ -0,0 +1,79 @@ + +DockerFile + +1. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. +2. The docker build command builds an image from a Dockerfile and a context. + ```sh + docker build . + docker build -f /path/to/a/Dockerfile . + docker build -t shykes/myapp . + ``` + +3. The Docker daemon runs the instructions in the Dockerfile one-by-one, committing the result of each instruction to a new image if necessary, before finally outputting the ID of your new image. +4. Whenever possible, Docker uses a build-cache to accelerate the docker build process significantly. +5. When you’re done with your build, you’re ready to look into scanning your image with docker scan + ```sh + docker scan hello-world + + ``` + +## Dockerfile Creation + + Docker file format + ```sh + # Comment + INSTRUCTION arguments + ``` + +1. A Dockerfile must begin with a FROM instruction. + +2. Docker distributes official versions of the images that can be used for building Dockerfiles under docker/dockerfile repository on Docker Hub. + +- `FROM` - A valid Dockerfile must start with a FROM instruction. + +- `RUN` - The RUN instruction will execute any commands in a new layer on top of the current image and commit the results. The resulting committed image will be used for the next step in the Dockerfile. + +- `CMD` - The main purpose of a CMD is to provide defaults for an executing container. + + `Note:` There can only be one CMD instruction in a Dockerfile. If you list more than one CMD then only the last CMD will take effect. + + `Note` - Do not confuse RUN with CMD. RUN actually runs a command and commits the result; CMD does not execute anything at build time, but specifies the intended command for the image. + +- `LABEL` -The LABEL instruction adds metadata to an image. A LABEL is a key-value pair. T + +- `EXPOSE` + 1. The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. + 2. To set up port redirection on the host system, see using the -P flag. + 3. The docker network command supports creating networks for communication among containers without the need to expose or publish specific ports, because the containers connected to the network can communicate with each other over any port. + +- `ENV` - The ENV instruction sets the environment variable to the value . + +- `ADD` - The ADD instruction copies new files, directories or remote file URLs from and adds them to the filesystem of the image at the path . + + If is a local tar archive in a recognized compression format (identity, gzip, bzip2 or xz) then it is unpacked as a directory. + +- `COPY` - The COPY instruction copies new files or directories from and adds them to the filesystem of the container at the path . + +- `ENTRYPOINT` - An ENTRYPOINT allows you to configure a container that will run as an executable. + + 1. ENTRYPOINT will override all elements specified using CMD + 2. Both CMD and ENTRYPOINT instructions define what command gets executed when running a container. There are few rules that describe their co-operation. + + 3. Dockerfile should specify at least one of CMD or ENTRYPOINT commands. + + 4. ENTRYPOINT should be defined when using the container as an executable. + + 5. CMD should be used as a way of defining default arguments for an ENTRYPOINT command or for executing an ad-hoc command in a container. + + 6. CMD will be overridden when running the container with alternative arguments. + +- `VOLUME` - The VOLUME instruction creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers. + +- `USER` - The USER instruction sets the user name to use when running the image +- `WORKDIR` - The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions + +- `ARG` - The ARG instruction defines a variable that users can pass at build-time to the builder with the docker build command using the --build-arg = flag. + +- `SHELL` - The SHELL instruction allows the default shell used for the shell form of commands to be overridden. + + From 1b030c661b32c3e956c574fb57d5bc3c93cbe259 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Nov 2021 15:28:06 +0530 Subject: [PATCH 06/23] added tomcat dockerfile --- Docker/apache-tomcat_dockerfile.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Docker/apache-tomcat_dockerfile.txt diff --git a/Docker/apache-tomcat_dockerfile.txt b/Docker/apache-tomcat_dockerfile.txt new file mode 100644 index 00000000..fa4963b1 --- /dev/null +++ b/Docker/apache-tomcat_dockerfile.txt @@ -0,0 +1,11 @@ +FROM centos +RUN mkdir /opt/tomcat/ +WORKDIR /opt/tomcat +ADD https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.54/bin/apache-tomcat-9.0.54.tar.gz /opt/tomcat +RUN tar xvfz apache*.tar.gz +RUN mv apache-tomcat-9.0.54/* /opt/tomcat +RUN yum -y install java +RUN java -version +EXPOSE 8080 +CMD ["/opt/tomcat/bin/catalina.sh", "run"] + From 746c0d26e78816addbf16bc250c2f31339a8e69f Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Mon, 8 Nov 2021 17:04:15 +0530 Subject: [PATCH 07/23] Update apache-tomcat_dockerfile.txt --- Docker/apache-tomcat_dockerfile.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docker/apache-tomcat_dockerfile.txt b/Docker/apache-tomcat_dockerfile.txt index fa4963b1..e773b4c3 100644 --- a/Docker/apache-tomcat_dockerfile.txt +++ b/Docker/apache-tomcat_dockerfile.txt @@ -1,11 +1,11 @@ FROM centos +RUN yum install java -y RUN mkdir /opt/tomcat/ WORKDIR /opt/tomcat ADD https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.54/bin/apache-tomcat-9.0.54.tar.gz /opt/tomcat RUN tar xvfz apache*.tar.gz RUN mv apache-tomcat-9.0.54/* /opt/tomcat -RUN yum -y install java -RUN java -version + EXPOSE 8080 CMD ["/opt/tomcat/bin/catalina.sh", "run"] From 2222f4564f4fe632d09feae9dc36ca7046e54b98 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Mon, 8 Nov 2021 17:04:25 +0530 Subject: [PATCH 08/23] Update apache-tomcat_dockerfile.txt --- Docker/apache-tomcat_dockerfile.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Docker/apache-tomcat_dockerfile.txt b/Docker/apache-tomcat_dockerfile.txt index e773b4c3..d4ffa84f 100644 --- a/Docker/apache-tomcat_dockerfile.txt +++ b/Docker/apache-tomcat_dockerfile.txt @@ -5,7 +5,6 @@ WORKDIR /opt/tomcat ADD https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.54/bin/apache-tomcat-9.0.54.tar.gz /opt/tomcat RUN tar xvfz apache*.tar.gz RUN mv apache-tomcat-9.0.54/* /opt/tomcat - EXPOSE 8080 CMD ["/opt/tomcat/bin/catalina.sh", "run"] From 57c37a53ce29ccc93a08ea2abafceac434aa3203 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Wed, 10 Nov 2021 10:25:47 +0530 Subject: [PATCH 09/23] Rename apache-tomcat_dockerfile.txt to apache-tomcat_dockerfile --- Docker/{apache-tomcat_dockerfile.txt => apache-tomcat_dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Docker/{apache-tomcat_dockerfile.txt => apache-tomcat_dockerfile} (100%) diff --git a/Docker/apache-tomcat_dockerfile.txt b/Docker/apache-tomcat_dockerfile similarity index 100% rename from Docker/apache-tomcat_dockerfile.txt rename to Docker/apache-tomcat_dockerfile From 05222af979c1012ac1d45c689e70db26b8e75be4 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Wed, 10 Nov 2021 10:26:05 +0530 Subject: [PATCH 10/23] Rename apache-tomcat_dockerfile to tomcat_dockerfile --- Docker/{apache-tomcat_dockerfile => tomcat_dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Docker/{apache-tomcat_dockerfile => tomcat_dockerfile} (100%) diff --git a/Docker/apache-tomcat_dockerfile b/Docker/tomcat_dockerfile similarity index 100% rename from Docker/apache-tomcat_dockerfile rename to Docker/tomcat_dockerfile From aa2ff427591f2b7fe26430b4ad8609a62037cc94 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Nov 2021 09:58:01 +0530 Subject: [PATCH 11/23] added Kuberenetes setup procedure --- ...etup.MD => Kubernetes_Setup_using_kops.md} | 209 +++++++++--------- Kubernetes/Kubernetes_Setup_using_kubeadm.md | 125 +++++++++++ Kubernetes/kubernetes_setup_using_eksctl.md | 63 ++++++ 3 files changed, 289 insertions(+), 108 deletions(-) rename Kubernetes/{Kubernetes-setup.MD => Kubernetes_Setup_using_kops.md} (66%) create mode 100644 Kubernetes/Kubernetes_Setup_using_kubeadm.md create mode 100644 Kubernetes/kubernetes_setup_using_eksctl.md diff --git a/Kubernetes/Kubernetes-setup.MD b/Kubernetes/Kubernetes_Setup_using_kops.md similarity index 66% rename from Kubernetes/Kubernetes-setup.MD rename to Kubernetes/Kubernetes_Setup_using_kops.md index 2a62c5cd..596a50bd 100644 --- a/Kubernetes/Kubernetes-setup.MD +++ b/Kubernetes/Kubernetes_Setup_using_kops.md @@ -1,108 +1,101 @@ -# Setup Kubernetes (K8s) Cluster on AWS - - -1. Create Ubuntu EC2 instance -1. install AWSCLI - ```sh - curl https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip - apt install unzip python - unzip awscli-bundle.zip - #sudo apt-get install unzip - if you dont have unzip in your system - ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws - ``` - -1. Install kubectl on ubuntu instance - ```sh - - curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl - chmod +x ./kubectl - sudo mv ./kubectl /usr/local/bin/kubectl - ``` - -1. Install kops on ubuntu instance - ```sh - curl -LO https://github.com/kubernetes/kops/releases/download/1.15.0/kops-linux-amd64 - chmod +x kops-linux-amd64 - sudo mv kops-linux-amd64 /usr/local/bin/kops - kops version (it should be 1.15.0) - Note: use below command if you wish to use latest version. For now we could see latest version of kops. So ignore it until further update. - # curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64 - - ``` -1. Create an IAM user/role with Route53, EC2, IAM and S3 full access - -1. Attach IAM role to ubuntu instance - ```sh - # Note: If you create IAM user with programmatic access then provide Access keys. Otherwise region information is enough - aws configure - ``` - -1. Create a Route53 private hosted zone (you can create Public hosted zone if you have a domain) - ```sh - Routeh53 --> hosted zones --> created hosted zone - Domain Name: valaxy.net - Type: Private hosted zone for Amazon VPC. Make sure you are chosing right VPC if you have multiple - ``` - -1. create an S3 bucket - ```sh - aws s3 mb s3://demo.k8s.valaxy.net - ``` -1. Expose environment variable: - ```sh - export KOPS_STATE_STORE=s3://demo.k8s.valaxy.net - ``` - -1. Create sshkeys before creating cluster - ```sh - ssh-keygen - ``` - -1. Create kubernetes cluster definitions on S3 bucket - ```sh - kops create cluster --cloud=aws --zones=ap-south-1b --name=demo.k8s.valaxy.net --dns-zone=valaxy.net --dns private - ``` - -1. Create kubernetes cluser - ```sh - kops update cluster demo.k8s.valaxy.net --yes - ``` -1. To cahnge the kubernetes master and worker instance sizes - ```sh - kops edit ig --name= nodes - #kops edit ig --name=demo.k8s.valaxy.net nodes - kops edit ig --name= master- - #kops edit ig --name=demo.k8s.valaxy.net master-ap-south-1b - ``` -1. to Delete cluster (try once your lab is done) - ```sh - kops delete cluster --yes - ``` -1. Validate your cluster - ```sh - kops validate cluster - ``` - -1. To list nodes - ```sh - kubectl get nodes - ``` - - - -#### Deploying Nginx pods on Kubernetes -1. Deploying Nginx Container - ```sh - kubectl run --generator=run-pod/v1 sample-nginx --image=nginx --replicas=2 --port=80 - #kubectl run sample-nginx --image=nginx --replicas=2 --port=80 - # kubectl run simple-devops-project --image=yankils/simple-devops-image --replicas=2 --port=8080 - kubectl get pods - kubectl get deployments - ``` - -1. Expose the deployment as service. This will create an ELB in front of those 2 containers and allow us to publicly access them. - ```sh - kubectl expose deployment sample-nginx --port=80 --type=LoadBalancer - # kubectl expose deployment simple-devops-project --port=8080 --type=LoadBalancer - kubectl get services -o wide - ``` +# Setup Kubernetes (K8s) Cluster on AWS + + +1. Create Ubuntu EC2 instance +1. install AWSCLI + ```sh + curl https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip + sudo apt update + sudo apt install unzip python + unzip awscli-bundle.zip + #sudo apt-get install unzip - if you dont have unzip in your system + ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws + ``` + +1. Install kubectl on ubuntu instance + ```sh + curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl + chmod +x ./kubectl + sudo mv ./kubectl /usr/local/bin/kubectl + ``` + +1. Install kops on ubuntu instance + ```sh + curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64 + chmod +x kops-linux-amd64 + sudo mv kops-linux-amd64 /usr/local/bin/kops + ``` +1. Create an IAM user/role with Route53, EC2, IAM and S3 full access + +1. Attach IAM role to ubuntu instance + ```sh + # Note: If you create IAM user with programmatic access then provide Access keys. Otherwise region information is enough + aws configure + ``` + +1. Create a Route53 private hosted zone (you can create Public hosted zone if you have a domain) + ```sh + Routeh53 --> hosted zones --> created hosted zone + Domain Name: valaxy.net + Type: Private hosted zone for Amzon VPC + ``` + +1. create an S3 bucket + ```sh + aws s3 mb s3://demo.k8s.valaxy.net + ``` +1. Expose environment variable: + ```sh + export KOPS_STATE_STORE=s3://demo.k8s.valaxy.net + ``` + +1. Create sshkeys before creating cluster + ```sh + ssh-keygen + ``` + +1. Create kubernetes cluster definitions on S3 bucket + ```sh + kops create cluster --cloud=aws --zones=ap-south-1b --name=demo.k8s.valaxy.net --dns-zone=valaxy.net --dns private + ``` + +1. If you wish to update the cluster worker node sizes use below command + ```sh + kops edit ig --name=CHANGE_TO_CLUSTER_NAME nodes + ``` + +1. Create kubernetes cluser + ```sh + kops update cluster demo.k8s.valaxy.net --yes + ``` + +1. Validate your cluster + ```sh + kops validate cluster + ``` + +1. To list nodes + ```sh + kubectl get nodes + ``` + +1. To delete cluster + ```sh + kops delete cluster demo.k8s.valaxy.net --yes + ``` + +#### Deploying Nginx pods on Kubernetes +1. Deploying Nginx Container + ```sh + kubectl run sample-nginx --image=nginx --replicas=2 --port=80 + # kubectl run simple-devops-project --image=yankils/simple-devops-image --replicas=2 --port=8080 + kubectl get pods + kubectl get deployments + ``` + +1. Expose the deployment as service. This will create an ELB in front of those 2 containers and allow us to publicly access them. + ```sh + kubectl expose deployment sample-nginx --port=80 --type=LoadBalancer + # kubectl expose deployment simple-devops-project --port=8080 --type=LoadBalancer + kubectl get services -o wide + ``` diff --git a/Kubernetes/Kubernetes_Setup_using_kubeadm.md b/Kubernetes/Kubernetes_Setup_using_kubeadm.md new file mode 100644 index 00000000..633d062b --- /dev/null +++ b/Kubernetes/Kubernetes_Setup_using_kubeadm.md @@ -0,0 +1,125 @@ +# Kubernetes Cluster installation using kubeadm +Follow this documentation to set up a Kubernetes cluster on __CentOS__ 7 machines. + +This documentation guides you in setting up a cluster with one master node and two worker nodes. + +## Prerequisites: +1. System Requirements + >Master: t2.medium (2 CPUs and 2GB Memory) + >Worker Nodes: t2.micro + +1. Open Below ports in the Security Group. + #### Master node: + `6443 + 32750 + 10250 + 4443 + 443 + 8080 ` + + ##### On Master node and Worker node: + `179` + + ### `On Master and Worker:` +1. Perform all the commands as root user unless otherwise specified + + Install, Enable and start docker service. + Use the Docker repository to install docker. + > If you use docker from CentOS OS repository, the docker version might be old to work with Kubernetes v1.13.0 and above + + ```sh + yum install -y -q yum-utils device-mapper-persistent-data lvm2 > /dev/null 2>&1 + yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo > /dev/null 2>&1 + yum install -y -q docker-ce >/dev/null 2>&1 + ``` +1. Start Docker services + ```sh + systemctl enable docker + systemctl start docker + ``` +1. Disable SELinux + ```sh + setenforce 0 + sed -i --follow-symlinks 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux + ``` +1. Disable Firewall + ```sh + systemctl disable firewalld + systemctl stop firewalld + ``` +1. Disable swap + ```sh + sed -i '/swap/d' /etc/fstab + swapoff -a + ``` +1. Update sysctl settings for Kubernetes networking + ```sh + cat >> /etc/sysctl.d/kubernetes.conf <>/etc/yum.repos.d/kubernetes.repo< --pod-network-cidr=192.168.0.0/16 + ``` +1. Create a user for kubernetes administration and copy kube config file. + ``To be able to use kubectl command to connect and interact with the cluster, the user needs kube config file.`` + In this case, we are creating a user called `kubeadmin` + ```sh + useradd kubeadmin + mkdir /home/kubeadmin/.kube + cp /etc/kubernetes/admin.conf /home/kubeadmin/.kube/config + chown -R kubeadmin:kubeadmin /home/kubeadmin/.kube + ``` +1. Deploy Calico network as a __kubeadmin__ user. + > This should be executed as a user (heare as a __kubeadmin__ ) + + ```sh + sudo su - kubeadmin + kubectl create -f https://docs.projectcalico.org/v3.9/manifests/calico.yaml + ``` + +1. Cluster join command + ```sh + kubeadm token create --print-join-command + ``` +## `On Worker Node:` +1. Add worker nodes to cluster + > Use the output from __kubeadm token create__ command in previous step from the master server and run here. + +1. Verifying the cluster + To Get Nodes status + ```sh + kubectl get nodes + ``` + To Get component status + ```sh + kubectl get cs + ``` + diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md new file mode 100644 index 00000000..d355737a --- /dev/null +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -0,0 +1,63 @@ +# Setup Kubernetes on Amazon EKS + +You can follow same procedure in the official AWS document [Getting started with Amazon EKS – eksctl](https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html) + +#### Pre-requisites: + - an EC2 Instance + +#### AWS EKS Setup +1. Setup kubectl + a. Download kubectl version 1.20 + b. Grant execution permissions to kubectl executable + c. Move kubectl onto /usr/local/bin + d. Test that your kubectl installation was successful + ```sh + chmod +x ./kubectl + curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl + mv ./kubectl /usr/local/bin + kubectl version --short --client + ``` +2. Setup eksctl + a. Download and extract the latest release + b. Move the extracted binary to /usr/local/bin + c. Test that your eksclt installation was successful + ```sh + curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp + sudo mv /tmp/eksctl /usr/local/bin + eksctl version + ``` + +3. Create an IAM Role and attache it to EC2 instance + `Note: create IAM user with programmatic access if your bootstrap system is outside of AWS` + IAM user should have access to + IAM + EC2 + VPC + CloudFormation + +4. Create your cluster and nodes + ```sh + eksctl create cluster --name cluster-name \ + --region region-name \ + --node-type instance-type \ + --nodes-min 2 \ + --nodes-max 2 \ + --zones , + + example: + eksctl create cluster --name valaxy-cluster \ + --region ap-south-1 \ + --node-type t2.small \ + ``` + +5. To delete the EKS clsuter + ```sh + eksctl delete cluster valaxy --region ap-south-1 + ``` + +6. Validate your cluster using by creating by checking nodes and by creating a pod + ```sh + kubectl get nodes + kubectl run pod tomcat --image=tomcat + ``` + From afb2718fe1648195681c8b8d05d26ca04a0c3dcf Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Thu, 11 Nov 2021 19:56:14 +0530 Subject: [PATCH 12/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index d355737a..8c0a3851 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -7,13 +7,14 @@ You can follow same procedure in the official AWS document [Getting started wit #### AWS EKS Setup 1. Setup kubectl - a. Download kubectl version 1.20 + a. Download kubectl version 1.21 b. Grant execution permissions to kubectl executable c. Move kubectl onto /usr/local/bin d. Test that your kubectl installation was successful ```sh - chmod +x ./kubectl + curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl + chmod +x ./kubectl mv ./kubectl /usr/local/bin kubectl version --short --client ``` From 2f23eddbff11070b344d6e47de22d24649013c9b Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Thu, 11 Nov 2021 21:42:48 +0530 Subject: [PATCH 13/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index 8c0a3851..aa2da567 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -59,6 +59,6 @@ You can follow same procedure in the official AWS document [Getting started wit 6. Validate your cluster using by creating by checking nodes and by creating a pod ```sh kubectl get nodes - kubectl run pod tomcat --image=tomcat + kubectl run tomcat --image=tomcat ``` From 3080a4ce5ee6d131b643df350ad15689c059a264 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Nov 2021 15:05:42 +0530 Subject: [PATCH 14/23] updated kops and eksctl files --- Kubernetes/Kubernetes_Setup_using_kops.md | 8 ++++---- Kubernetes/kubernetes_setup_using_eksctl.md | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Kubernetes/Kubernetes_Setup_using_kops.md b/Kubernetes/Kubernetes_Setup_using_kops.md index 596a50bd..1d33f4f7 100644 --- a/Kubernetes/Kubernetes_Setup_using_kops.md +++ b/Kubernetes/Kubernetes_Setup_using_kops.md @@ -87,10 +87,10 @@ #### Deploying Nginx pods on Kubernetes 1. Deploying Nginx Container ```sh - kubectl run sample-nginx --image=nginx --replicas=2 --port=80 - # kubectl run simple-devops-project --image=yankils/simple-devops-image --replicas=2 --port=8080 - kubectl get pods - kubectl get deployments + kubectl deploy sample-nginx --image=nginx --replicas=2 --port=80 + # kubectl deploy simple-devops-project --image=yankils/simple-devops-image --replicas=2 --port=8080 + kubectl get all + kubectl get pod ``` 1. Expose the deployment as service. This will create an ELB in front of those 2 containers and allow us to publicly access them. diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index aa2da567..1e36cf58 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -4,15 +4,15 @@ You can follow same procedure in the official AWS document [Getting started wit #### Pre-requisites: - an EC2 Instance + - Install AWSCLI latest verison -#### AWS EKS Setup 1. Setup kubectl a. Download kubectl version 1.21 b. Grant execution permissions to kubectl executable c. Move kubectl onto /usr/local/bin d. Test that your kubectl installation was successful + ```sh - curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl chmod +x ./kubectl mv ./kubectl /usr/local/bin @@ -22,6 +22,7 @@ You can follow same procedure in the official AWS document [Getting started wit a. Download and extract the latest release b. Move the extracted binary to /usr/local/bin c. Test that your eksclt installation was successful + ```sh curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp sudo mv /tmp/eksctl /usr/local/bin @@ -33,9 +34,9 @@ You can follow same procedure in the official AWS document [Getting started wit IAM user should have access to IAM EC2 - VPC CloudFormation - + Note: Check eksctl documentaiton for (Minimum IAM policies)[https://eksctl.io/usage/minimum-iam-policies/) + 4. Create your cluster and nodes ```sh eksctl create cluster --name cluster-name \ From 09a1a56ce83f04500d1607a58d76224dcc2cc31e Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Fri, 12 Nov 2021 18:36:11 +0530 Subject: [PATCH 15/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index 1e36cf58..a3aba6a6 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -34,7 +34,7 @@ You can follow same procedure in the official AWS document [Getting started wit IAM user should have access to IAM EC2 - CloudFormation + CloudFormation Note: Check eksctl documentaiton for (Minimum IAM policies)[https://eksctl.io/usage/minimum-iam-policies/) 4. Create your cluster and nodes From d57ca35d8b66d58aaa3344b2d9f19559306c309b Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Fri, 12 Nov 2021 19:36:21 +0530 Subject: [PATCH 16/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index a3aba6a6..604b716d 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -35,7 +35,7 @@ You can follow same procedure in the official AWS document [Getting started wit IAM EC2 CloudFormation - Note: Check eksctl documentaiton for (Minimum IAM policies)[https://eksctl.io/usage/minimum-iam-policies/) + Note: Check eksctl documentaiton for (Minimum IAM policies)[https://eksctl.io/usage/minimum-iam-policies/] 4. Create your cluster and nodes ```sh From 73e2239546aab1d4326177d314b2409c7dbf656a Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Fri, 12 Nov 2021 19:36:53 +0530 Subject: [PATCH 17/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index 604b716d..bd5b8cb4 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -35,7 +35,7 @@ You can follow same procedure in the official AWS document [Getting started wit IAM EC2 CloudFormation - Note: Check eksctl documentaiton for (Minimum IAM policies)[https://eksctl.io/usage/minimum-iam-policies/] + Note: Check eksctl documentaiton for [Minimum IAM policies](https://eksctl.io/usage/minimum-iam-policies/) 4. Create your cluster and nodes ```sh From 8f82ef563d0e6d1fba212048bf074ec18acfe855 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Fri, 12 Nov 2021 22:08:09 +0530 Subject: [PATCH 18/23] Update Kubernetes_Setup_using_kops.md --- Kubernetes/Kubernetes_Setup_using_kops.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/Kubernetes_Setup_using_kops.md b/Kubernetes/Kubernetes_Setup_using_kops.md index 1d33f4f7..080e19c7 100644 --- a/Kubernetes/Kubernetes_Setup_using_kops.md +++ b/Kubernetes/Kubernetes_Setup_using_kops.md @@ -87,7 +87,7 @@ #### Deploying Nginx pods on Kubernetes 1. Deploying Nginx Container ```sh - kubectl deploy sample-nginx --image=nginx --replicas=2 --port=80 + kubectl create deploy sample-nginx --image=nginx --replicas=2 --port=80 # kubectl deploy simple-devops-project --image=yankils/simple-devops-image --replicas=2 --port=8080 kubectl get all kubectl get pod From e56faf6caa76a381fef22c4cdd4a4d0e7d5ff138 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Sat, 13 Nov 2021 06:45:11 +0530 Subject: [PATCH 19/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index bd5b8cb4..ad903bd0 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -62,4 +62,20 @@ You can follow same procedure in the official AWS document [Getting started wit kubectl get nodes kubectl run tomcat --image=tomcat ``` + + #### Deploying Nginx pods on EKS +1. Deploying Nginx Container + ```sh + kubectl create deploy sample-nginx --image=nginx --replicas=2 --port=80 + # kubectl deployment regapp --image=valaxy/regapp --replicas=2 --port=8080 + kubectl get all + kubectl get pod + ``` + +1. Expose the deployment as service. This will create an ELB in front of those 2 containers and allow us to publicly access them. + ```sh + kubectl expose deployment sample-nginx --port=80 --type=LoadBalancer + # kubectl expose deployment regapp --port=8080 --type=LoadBalancer + kubectl get services -o wide + ``` From 58ba7c07b789d4b4f5f247af82a3fac28adb7b01 Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Sat, 13 Nov 2021 06:46:40 +0530 Subject: [PATCH 20/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index ad903bd0..2bf7f81b 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -63,10 +63,10 @@ You can follow same procedure in the official AWS document [Getting started wit kubectl run tomcat --image=tomcat ``` - #### Deploying Nginx pods on EKS + #### Deploying Nginx pods on Kubernetes 1. Deploying Nginx Container ```sh - kubectl create deploy sample-nginx --image=nginx --replicas=2 --port=80 + kubectl create deploy demo-nginx --image=nginx --replicas=2 --port=80 # kubectl deployment regapp --image=valaxy/regapp --replicas=2 --port=8080 kubectl get all kubectl get pod @@ -74,7 +74,7 @@ You can follow same procedure in the official AWS document [Getting started wit 1. Expose the deployment as service. This will create an ELB in front of those 2 containers and allow us to publicly access them. ```sh - kubectl expose deployment sample-nginx --port=80 --type=LoadBalancer + kubectl expose deployment demo-nginx --port=80 --type=LoadBalancer # kubectl expose deployment regapp --port=8080 --type=LoadBalancer kubectl get services -o wide ``` From 07b8fd47a8a67178daec898754febe40a4dd8bbd Mon Sep 17 00:00:00 2001 From: yankils <46080533+yankils@users.noreply.github.com> Date: Sat, 13 Nov 2021 08:05:00 +0530 Subject: [PATCH 21/23] Update kubernetes_setup_using_eksctl.md --- Kubernetes/kubernetes_setup_using_eksctl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kubernetes/kubernetes_setup_using_eksctl.md b/Kubernetes/kubernetes_setup_using_eksctl.md index 2bf7f81b..a58df311 100644 --- a/Kubernetes/kubernetes_setup_using_eksctl.md +++ b/Kubernetes/kubernetes_setup_using_eksctl.md @@ -66,7 +66,7 @@ You can follow same procedure in the official AWS document [Getting started wit #### Deploying Nginx pods on Kubernetes 1. Deploying Nginx Container ```sh - kubectl create deploy demo-nginx --image=nginx --replicas=2 --port=80 + kubectl create deployment demo-nginx --image=nginx --replicas=2 --port=80 # kubectl deployment regapp --image=valaxy/regapp --replicas=2 --port=8080 kubectl get all kubectl get pod From 911163b221482b70daf4bb6d785891fbd3187a33 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 13 Nov 2021 12:50:29 +0530 Subject: [PATCH 22/23] added deploy and service files for regapp --- Kubernetes/firstpod.yml | 14 ++++++++++++++ Kubernetes/firstrs.yml | 17 +++++++++++++++++ Kubernetes/firstservice.yml | 17 +++++++++++++++++ Kubernetes/regapp-deploy.yml | 29 +++++++++++++++++++++++++++++ Kubernetes/regapp-service.yml | 15 +++++++++++++++ 5 files changed, 92 insertions(+) create mode 100644 Kubernetes/firstpod.yml create mode 100644 Kubernetes/firstrs.yml create mode 100644 Kubernetes/firstservice.yml create mode 100644 Kubernetes/regapp-deploy.yml create mode 100644 Kubernetes/regapp-service.yml diff --git a/Kubernetes/firstpod.yml b/Kubernetes/firstpod.yml new file mode 100644 index 00000000..48c7fd81 --- /dev/null +++ b/Kubernetes/firstpod.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Pod +metadata: + name: nginx-pod + labels: + app: demo-app + +spec: + containers: + - name: nginx-container + image: nginx + ports: + - name: nginx + containerPort: 80 diff --git a/Kubernetes/firstrs.yml b/Kubernetes/firstrs.yml new file mode 100644 index 00000000..9021aff9 --- /dev/null +++ b/Kubernetes/firstrs.yml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: ReplicaSet +metadata: + name: demo-app +spec: + replicas: 1 + template: + metadata: + labels: + app: demo-app + + spec: + containers: + - name: demo-app + image: nginx + + diff --git a/Kubernetes/firstservice.yml b/Kubernetes/firstservice.yml new file mode 100644 index 00000000..59db6d7c --- /dev/null +++ b/Kubernetes/firstservice.yml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: demo-service + +spec: + ports: + - name: demo-service + port: 80 + targetPort: 80 + + selector: + app: demo-app + + type: LoadBalancer + + kubectl expose webapp --type=NodePort --targerPort=80 -- \ No newline at end of file diff --git a/Kubernetes/regapp-deploy.yml b/Kubernetes/regapp-deploy.yml new file mode 100644 index 00000000..6ef59cef --- /dev/null +++ b/Kubernetes/regapp-deploy.yml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: valaxy-regapp + labels: + app: regapp + +spec: + replicas: 2 + selector: + matchLabels: + app: regapp + + template: + metadata: + labels: + app: regapp + spec: + containers: + - name: regapp + image: valaxy/regapp + imagePullPolicy: Always + ports: + - containerPort: 8080 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 \ No newline at end of file diff --git a/Kubernetes/regapp-service.yml b/Kubernetes/regapp-service.yml new file mode 100644 index 00000000..3fe9e051 --- /dev/null +++ b/Kubernetes/regapp-service.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: valaxy-service + labels: + app: regapp +spec: + selector: + app: regapp + + ports: + - port: 8080 + targetPort: 8080 + + type: LoadBalancer \ No newline at end of file From 427cfbcc580335631ff22bacffa6fbfe9340c714 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 13 Nov 2021 17:39:24 +0530 Subject: [PATCH 23/23] added files --- Kubernetes/create_image_regapp.yml | 15 +++++++++++++++ Kubernetes/kube_deploy.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Kubernetes/create_image_regapp.yml create mode 100644 Kubernetes/kube_deploy.yml diff --git a/Kubernetes/create_image_regapp.yml b/Kubernetes/create_image_regapp.yml new file mode 100644 index 00000000..910aedbc --- /dev/null +++ b/Kubernetes/create_image_regapp.yml @@ -0,0 +1,15 @@ +--- +- hosts: ansible + + tasks: + - name: create docker image + command: docker build -t regapp:latest . + args: + chdir: /opt/docker + + - name: create tag to push image onto dockerhub + command: docker tag regapp:latest valaxy/regapp:latest + + - name: push docker image + command: docker push valaxy/regapp:latest + diff --git a/Kubernetes/kube_deploy.yml b/Kubernetes/kube_deploy.yml new file mode 100644 index 00000000..ac403464 --- /dev/null +++ b/Kubernetes/kube_deploy.yml @@ -0,0 +1,15 @@ +--- +- hosts: kubernetes +# become: ture + user: root + + tasks: + - name: deploy regapp on kubernetes + command: kubectl apply -f regapp-deployment.yml + + - name: create service for regapp + command: kubectl apply -f regapp-service.yml + + - name: update deployment with new pods if image updated in docker hub + command: kubectl rollout restart deployment.apps/valaxy-regapp +