Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armada/midterm #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM centos:7

RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023

RUN yum -y update && \
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

RUN yum -y install mysql-server && \
yum clean all

RUN echo '[mysqld]' > /etc/my.cnf && \
echo 'datadir = /var/lib/mysql' >> /etc/my.cnf

ENV MYSQL_ROOT_PASSWORD=root

RUN mkdir -p /var/run/mysql && \
chown -R mysql:mysql /var/run/mysql && \
chmod -R 750 /var/run/mysql

COPY mysql.sh /usr/local/bin/mysql.sh
RUN chmod +x /usr/local/bin/mysql.sh

RUN /usr/sbin/mysqld --initialize-insecure --user=mysql --basedir=/usr --datadir=/var/lib/mysql --lc-messages=en_US

CMD ["sh", "-c", "/usr/local/bin/mysql.sh && /usr/sbin/mysqld --datadir=/var/lib/mysql --user=mysql --port=3306"]

EXPOSE 3306
34 changes: 34 additions & 0 deletions armada_question1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
![DevOps Workflow and Toolchain](/armada_question1_devops.png)

1. Plan
- Defining project goals, user stories, and timelines.
- Jira and Trello are project management tools used in the planning stage to define tasks, track progress, and collaborate on project goals.

2. Code
- Developers write, test, and commit code.
- Git, a version control system, is used in DevOps to track code changes and enable collaboration, while Visual Studio Code, an IDE, provides developers with a comprehensive environment for writing, editing, and debugging code.

3. Build
- Automating the process of compiling and packaging the application.
- Maven and Gradle are build automation tools used in DevOps to automate the build process, including compiling code, running tests, and packaging the application for deployment.

4. Test
- Rigorously testing the application to ensure functionality and quality.
- JUnit is a unit testing framework specifically designed for Java, while Cypress is a functional testing tool that works across various web browsers.

5. Release
- Preparing the application for deployment to different environments.
- Both Codeship and Jenkins automate DevOps releases, with Codeship focusing on cloud deployments and Jenkins offering broader CI workflow customization.

6. Deploy
- Delivering the application to the target environment (staging, production).
- Terraform manages infrastructure provisioning in DevOps deployments, while Puppet configures and automates server and application setups.

7. Operate
- Managing and maintaining the deployed application.
- Docker and Kubernetes are used in DevOps to package and manage containerized applications, enabling efficient deployment, scaling, and operation.

8. Monitor
- Continuously observing and analyzing application performance and user behavior.
- Both Prometheus and Datadog play crucial roles in monitoring the health and performance of applications and infrastructure within the DevOps workflow.

Binary file added armada_question1_devops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions armada_question2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM centos:7

RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2023

RUN yum -y update && \
yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

RUN yum -y install mysql-server && \
yum clean all

RUN echo '[mysqld]' > /etc/my.cnf && \
echo 'datadir = /var/lib/mysql' >> /etc/my.cnf

ENV MYSQL_ROOT_PASSWORD=root

RUN mkdir -p /var/run/mysql && \
chown -R mysql:mysql /var/run/mysql && \
chmod -R 750 /var/run/mysql

COPY mysql.sh /usr/local/bin/mysql.sh
RUN chmod +x /usr/local/bin/mysql.sh

RUN /usr/sbin/mysqld --initialize-insecure --user=mysql --basedir=/usr --datadir=/var/lib/mysql --lc-messages=en_US

CMD ["sh", "-c", "/usr/local/bin/mysql.sh && /usr/sbin/mysqld --datadir=/var/lib/mysql --user=mysql --port=3306"]

EXPOSE 3306
18 changes: 18 additions & 0 deletions armada_question3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
List 3 advantages of using Docker.
List 3 benefits of DevOps framework.


Advantages of using Docker:
1. Portability: Docker containers are self-contained bundles that include all the necessary dependencies (code, libraries, runtime) to run an application consistently across different environments (development, testing, production) regardless of the underlying operating system. This eliminates the "it works on my machine" problem and simplifies deployment across various platforms.

2. Isolation: Docker containers provide process and file system isolation, ensuring applications run independently without affecting each other or the host system. This enhances security and stability by preventing conflicts and unintended interactions.

3. Scalability: Docker containers are lightweight and resource-efficient, making them ideal for scaling applications. You can easily spin up or down additional containers as needed to meet fluctuating demands, allowing for efficient resource utilization and cost optimization.


Benefits of DevOps framework:
1. Faster software delivery: DevOps automates many aspects of the software development and deployment process, leading to shorter release cycles and quicker time-to-market.

2. Improved collaboration: DevOps bridges the gap between development and operations teams, fostering a culture of collaboration and shared responsibility throughout the software lifecycle.

3. Enhanced reliability and quality: Continuous integration and continuous delivery (CI/CD) practices, central to DevOps, enable frequent testing and feedback loops, resulting in faster bug detection, improved software quality, and a more reliable product.
13 changes: 13 additions & 0 deletions mysql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

mysqld --user=root --daemonize

sleep 10

mysql -u root -e "CREATE USER 'sa'@'%' IDENTIFIED BY 'password';"

mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'sa'@'%' IDENTIFIED BY 'password';"

mysql -u root -e "FLUSH PRIVILEGES;"

tail -f /dev/null