Skip to content

Commit

Permalink
Converted to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrano committed Nov 30, 2021
1 parent 15a9690 commit 6506d93
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 27 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI Build
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
container: python:3.9-slim

# Required services
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
- name: Run unit tests with nose
run: nosetests
env:
DATABASE_URI: "redis://redis:6379"

- name: Upload code coverage
uses: codecov/codecov-action@v2

17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
# Docker and Kubernetes Lab

[![Build Status](https://travis-ci.org/nyu-devops/lab-kubernetes.svg?branch=master)](https://travis-ci.org/devops/lab-kubernetes)
[![Build Status](https://github.com/nyu-devops/lab-kubernetes/actions/workflows/workflow.yaml/badge.svg)](https://github.com/nyu-devops/lab-kubernetes/actions)

What is Docker? How can Docker containers help you build and deploy a cloud native solution as micro-services? This lab will teach you what-you-need-to-know to get started building and running Docker Containers in IBM Bluemix. It covers what Docker is, and more importantly, what Docker is not! You will learn how to deploy and run existing Docker community images, how to create your own Docker images and push them to Bluemix, and how to connect containers together using Docker Compose. If you want to know what all this fuss about containers is about, come to this lab and spin up a few containers and see for yourself why everyone is adopting Docker.
What is Docker? How can Docker containers help you build and deploy a cloud native solution as micro-services? This lab will teach you what-you-need-to-know to get started building and running Docker Containers in IBM Cloud. It covers what Docker is, and more importantly, what Docker is not! You will learn how to deploy and run existing Docker community images, how to create your own Docker images and push them to IBM Cloud, and how to connect containers together using Docker Compose. If you want to know what all this fuss about containers is about, come to this lab and spin up a few containers and see for yourself why everyone is adopting Docker.

This lab is an example of how to create a Python / Flask / Redis app using Docker on Bluemix
This lab is an example of how to create a Python / Flask / Redis app using Docker on IBM Cloud

## Setting up your Development Environment
You must either install Docker and the IBM Cloud CLI and IBM Container plug-in locally on your computer or use the Vagrant image that is included in this repo. We highly recommend just using Vegrant and VirtualBox.

There are three ways to use this lab:

1. You can use Docker Desktop and Visual Studio Code with the Remote Containers extensions to run this lab in a Docker contaner development environment (preferred)
2. You can use Vagrant and VirtualBox to create a development environment in a local virtual machine.
3. You can Docker and the IBM Cloud CLI and IBM Container plug-in locally on your computer.

### Docker and Visual Studio Code

This option is preferred and is the only option if you have an Apple M1 Silicon Mac that is based on the ARM archotecture as VirtualBox does not support ARM.

This option also assumes that you have completed previous labs and have the following files exist your computer:

| Filename | Description |
| -------- | ----------- |
| ~/.gitconfig | Git configuration file |
| ~/.ssh/ | SSH keys folder |
| ~/.bluemix/ | IBM Cloud folder |

If you don't have all three of these the containers will fail to come up because these folders are shared with the container so that you can work in your development cotainer with the same identity and credentials as you do on your computer.

### Vagrant and VirtualBox (Intel only!)

We use Vagrant, VirtualBox, and Docker for virtualizing our development environment. Vagrant is technology that allows you to quickly provision and configure Linux virtual machines on your computer. VirtualBox is a hypervisor like VMware Fusion that hosts virtual machines. Docker is technology that will run multiple containers within a single Linux host machine. Together they make a powerful development environment that mimics multiple servers in a production environment.

Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Vagrant.configure(2) do |config|
echo "\n"
echo "ibmcloud login -a https://cloud.ibm.com --apikey @~/.bluemix/apikey.json -r us-south"
echo "ibmcloud ks cluster config --cluster <your-cluster-name>"
echo "ibmcloud cr login"
echo "\n************************************"
SHELL

Expand Down
12 changes: 6 additions & 6 deletions samples/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ spec:
app: nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
protocol: TCP
- image: nginx:alpine
name: nginx
ports:
- containerPort: 80
protocol: TCP
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -52,4 +52,4 @@ spec:
service:
name: nginx
port:
number: 80
number: 80

0 comments on commit 6506d93

Please sign in to comment.