Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
67 changes: 67 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:11
steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn test

deploy:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo apt-get update
sudo apt-get install -y python3-pip --force-yes
pip3 install awscli
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs --force-yes
- run:
name: Install doctl
command: |
wget https://github.com/digitalocean/doctl/releases/download/v1.64.0/doctl-1.64.0-linux-amd64.tar.gz
tar xf doctl-1.64.0-linux-amd64.tar.gz
sudo mv doctl /usr/local/bin
rm doctl-1.64.0-linux-amd64.tar.gz
- run:
name: Authenticate with DigitalOcean
command: |
doctl auth init --access-token $OCEAN_API_KEY
doctl kubernetes cluster kubeconfig save first-project
kubectl config use-context do-hammerhead-app
- run:
name: Deploy to DigitalOcean
command: |
kubectl apply -f k8s

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: purelab
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM --platform=linux/arm64 node:11
WORKDIR /dist
COPY package.json /dist
RUN npm install
COPY . /dist
CMD node server.js
EXPOSE 4000
Binary file added badbuild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions labreports/LAB_wadebuhr
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Lab Report: UX/UI
___
**Course:** CIS 411, Spring 2021
**Instructor(s):** [Trevor Bunch](https://github.com/trevordbunch)
**Name:** Wade Buhr
**GitHub Handle:** wadebuhr
**Repository:** https://github.com/wadebuhr/cis411_lab4_CD/blob/purelab/
**Collaborators:** None
___

# Required Content

- [ X] Generate a markdown file in the labreports directory named LAB_[GITHUB HANDLE].md. Write your lab report there.
- [ X] Create the directory ```./circleci``` and the file ```.circleci/config.yml``` in your project and push that change to your GitHub repository.
- [ x] Create the file ```Dockerfile``` in the root of your project and include the contents of the file as described in the instructions. Push that change to your GitHub repository.
- [ ] Write the URL of your app hosted on Heroku or other Cloud Provider here:
> [Link to my digital tree app](https://cloud.digitalocean.com/projects/f5a6b8c8-63b6-4c51-bc7c-37dedffc93c3/resources?i=95084e)
- [ x] Embed _using markdown_ a screenshot of your successful deployed application to Heroku.
> Example: ![Unsuccessful Build](badbuild.png)

Everything was working until the deployment phase. I kept getting "exec format error" and when I further researched it, I learned it was a mac problem and I tried to implment a solution by updating the Dockerfile, but I got no success.
- [ x] Embed _using markdown_ a screenshot of your successful build and deployment to Heroku of your project (with the circleci interface).
> Example: ![Successful Build](circleci.png)
- [ x] Answer the **4** questions below.
- [x ] Submit a Pull Request to cis411_lab4_CD and provide the URL of that Pull Request in Canvas as your URL submission.

## Questions
1. Why would a containerized version of an application be beneficial if you can run the application locally already?
> A containerized version of an application does not depend on the host OS making it portable and able to run smoothly across any platform. The lightweight feature of containers means higher server efficiencies and also means less time to start becuase there is no OS to boot. Container technology also means a greater sense of scalability. This environment means that someone could add new features, updates, and functions without affecting the original applicaitons.
1. If we have the ability to publish directory to Heroku, why involve a CI solution like CircleCI? What benefit does it provide?
> Heroku is great for deployment, however the CircleCI means adding another auotmation process to the mix. Whenever you push a commit, CircleCI will run integrate that commit with the existing application and checks if it passes or not. If your commits pass, then CircleCI will pass on the code to Heroku to deploy it.
1. Why would you use a container technology over a virtual machine(VM)?
> Container technologies run natively on an OS. Containers also require fewere IT resources to deploy, run and manage. Since containers don't use hypervisors, they are much faster and load in milliseconds compared to virtual machines. A single system can also hold many containers comparedd to virtual machines that take up storage for each one you incorporate. Overall containers offer flexibility and portability that is needed in cloud based technology.
1. What are some alternatives to Docker for containerized deployments?
> Kubernetes is widely used by different compaines. Kubernetes excells at hosting cloud native applications that need rapid scaling.
>
> LXC (Linux) is a low-level container management tool and the predecessor of docker. Its goal was to offer a virtual machine type feel without the overhead of running its own kernel.
>
> RKT has become one of the most viable options other than docker, beacuase of its security and its ability to communicate effectively with the end users.
>
> Containerd is a standalone container runtime application, and it focuses on simplicity and portability. Because it is low level, you don't have to worry about complexity and offers great performance.
Binary file added labreports/badbuild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labreports/circleci.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/browserslist-lint

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esparse

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/esvalidate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/jsesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nyc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/parser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading