diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..f21cdca3 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,20 @@ + name: Deploy Website + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./krishnasree@mulearn/Task-3 diff --git a/FinalProject/deployment.yaml b/FinalProject/deployment.yaml new file mode 100644 index 00000000..90d76e2d --- /dev/null +++ b/FinalProject/deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-web-app +spec: + replicas: 3 + selector: + matchLabels: + app: my-web-app + template: + metadata: + labels: + app: my-web-app + spec: + containers: + - name: my-container + image: my-web-app:latest + imagePullPolicy: Never + ports: + - containerPort: 80 + env: + - name: STUDENT_NAME + value: "Krishnasree" \ No newline at end of file diff --git a/FinalProject/dockerfile b/FinalProject/dockerfile new file mode 100644 index 00000000..b02cedbd --- /dev/null +++ b/FinalProject/dockerfile @@ -0,0 +1,3 @@ +FROM nginx:alpine + +COPY index.html /usr/share/nginx/html/index.html \ No newline at end of file diff --git a/FinalProject/index.html b/FinalProject/index.html new file mode 100644 index 00000000..58392eb7 --- /dev/null +++ b/FinalProject/index.html @@ -0,0 +1,10 @@ + + +
+Student: Krishnasree
+ + \ No newline at end of file diff --git a/krishnasree@mulearn/.github/workflows/deploy.yml b/krishnasree@mulearn/.github/workflows/deploy.yml new file mode 100644 index 00000000..bfebaa39 --- /dev/null +++ b/krishnasree@mulearn/.github/workflows/deploy.yml @@ -0,0 +1,20 @@ +name: Deploy Website + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./krishnasree@mulearn/Task-3 diff --git a/krishnasree@mulearn/.github/workflows/deploy1.yml b/krishnasree@mulearn/.github/workflows/deploy1.yml new file mode 100644 index 00000000..f21cdca3 --- /dev/null +++ b/krishnasree@mulearn/.github/workflows/deploy1.yml @@ -0,0 +1,20 @@ + name: Deploy Website + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./krishnasree@mulearn/Task-3 diff --git a/krishnasree@mulearn/README.md b/krishnasree@mulearn/README.md new file mode 100644 index 00000000..d2f83c20 --- /dev/null +++ b/krishnasree@mulearn/README.md @@ -0,0 +1,2 @@ +#selfintroduction +Hello, I'm Krishnasree. I'm a Computer Science and Engineering student at Marian Engineering College, Kazhakuttom. diff --git a/krishnasree@mulearn/Task-2/Dockerfile b/krishnasree@mulearn/Task-2/Dockerfile new file mode 100644 index 00000000..7f58733b --- /dev/null +++ b/krishnasree@mulearn/Task-2/Dockerfile @@ -0,0 +1,4 @@ +FROM python:3.9 +WORKDIR /app +COPY . . +CMD ["python", "script.py"] \ No newline at end of file diff --git a/krishnasree@mulearn/Task-2/script.py b/krishnasree@mulearn/Task-2/script.py new file mode 100644 index 00000000..8395f612 --- /dev/null +++ b/krishnasree@mulearn/Task-2/script.py @@ -0,0 +1,7 @@ +import time + +print("🚀 Container Started") + +while True: + print("Hello World") + time.sleep(5) \ No newline at end of file diff --git a/krishnasree@mulearn/Task-3/.github/workflows/deploy.yml b/krishnasree@mulearn/Task-3/.github/workflows/deploy.yml new file mode 100644 index 00000000..de3f2cc9 --- /dev/null +++ b/krishnasree@mulearn/Task-3/.github/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./krishnasree@mulearn/Task-3 + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v2 diff --git a/krishnasree@mulearn/Task-3/index.html b/krishnasree@mulearn/Task-3/index.html new file mode 100644 index 00000000..1c241fcc --- /dev/null +++ b/krishnasree@mulearn/Task-3/index.html @@ -0,0 +1,10 @@ + + + +This site is deployed using GitHub Actions!
+ + diff --git a/krishnasree@mulearn/Task-3/submission.md b/krishnasree@mulearn/Task-3/submission.md new file mode 100644 index 00000000..08de8e90 --- /dev/null +++ b/krishnasree@mulearn/Task-3/submission.md @@ -0,0 +1,13 @@ +# CI/CD Assignment Submission + +Name: Krishnasree +muid: krishnasree@mulearn + +## 🔗 Repository Link +https://github.com/Krishnasree26/Shipyard-Foundations + +## 🌐 Live Website +https://Krishnasree26.github.io/Shipyard-Foundations/ + +## 🌐 Git Actions Link +https://github.com/Krishnasree26/Shipyard-Foundations/actions diff --git a/krishnasree@mulearn/Task-4/deployment.yaml b/krishnasree@mulearn/Task-4/deployment.yaml new file mode 100644 index 00000000..7bea728a --- /dev/null +++ b/krishnasree@mulearn/Task-4/deployment.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx + ports: + - containerPort: 80 \ No newline at end of file diff --git a/krishnasree@mulearn/Task-4/service.yaml b/krishnasree@mulearn/Task-4/service.yaml new file mode 100644 index 00000000..ca668397 --- /dev/null +++ b/krishnasree@mulearn/Task-4/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx-service +spec: + type: NodePort + selector: + app: nginx + ports: + - protocol: TCP + port: 80 + targetPort: 80 + nodePort: 30007 \ No newline at end of file diff --git a/krishnasree@mulearn/Task-4/task4a.png b/krishnasree@mulearn/Task-4/task4a.png new file mode 100644 index 00000000..54123418 Binary files /dev/null and b/krishnasree@mulearn/Task-4/task4a.png differ diff --git a/krishnasree@mulearn/Task-4/task4b.png b/krishnasree@mulearn/Task-4/task4b.png new file mode 100644 index 00000000..d2fa218a Binary files /dev/null and b/krishnasree@mulearn/Task-4/task4b.png differ diff --git a/krishnasree@mulearn/Task-4/task4c.png b/krishnasree@mulearn/Task-4/task4c.png new file mode 100644 index 00000000..88b6a3dc Binary files /dev/null and b/krishnasree@mulearn/Task-4/task4c.png differ