Giter Site home page Giter Site logo

nyu-devops-homework-1's People

Contributors

cantal0p3 avatar gnishma24 avatar ilanasufrin avatar mafshar avatar skyline220 avatar sschweber avatar

Watchers

 avatar  avatar  avatar  avatar

nyu-devops-homework-1's Issues

Push the application to Bluemix

As a developer
I want to push the application to Bluemix
So that I can visit an external URL and see the running application properly

Acceptance Criteria
I want to be able to visit a URL
And see the running application
This includes QAing all the methods

Hint: use cf push

Deploy the service in Docker Containers on Bluemix

In Part 1 you will package your existing code to run in a Docker container. Then you will deploy that Docker container into the Bluemix Container Cloud. This homework requires that you use some type of persistent storage so that your application survives a restart. Make sure that any 3rd party services like Redis get bound to the container so that it continues to work properly. You want to take advantage of the horizontal scaling capabilities of the cloud so be sure to deploy a Container Group and not just an individual container.

You will need to:

Add persistent storage to your application if you haven't already. Docker containers must keep all state external. Redis is fine for storing Python dictionary collections. It doesn't have to be a fancy database, it just has to survive a container restart.
Create a Dockerfile to build your image
Create a container from your image and test it locally
Push your image to the Bluemix Docker Registry using the cf ic (Cloud Foundry IBM Containers) command line interface
Create a Container Group to run at least 2 instances of your containers
Make sure the Container Group is bound to any Services you are using (e.g. Redis)
Hit the URL of your new service and make sure that it works (it can be the same URL if you delete your Cloud Foundry app or a new URL. It's your choice)
Write Stories (as Github Issues) to plan the work needed to create the Dockerfile and add them to your Backlog.
Conduct a Sprint Planning meeting to discuss the Backlog and order the Stories by priority.
Set up your Milestones and Burndown chart so that you can track your progress. Create 2 sprints to do this.
Move these Stories through the ZenHub pipeline as you work on them just like you did in homework 1
What I am looking for here is a working service that is running on Bluemix as a scalable container group. I also want to see the Dockerfile is using Best practices for writing Dockerfiles

Please submit the URL of your group's service running in Bluemix to complete Part 1 of this homework.

Change Status of Ice cream

As a developer
I need to create a service
So that someone can melt of freeze an ice cream flavor

Acceptance Criteria:
When I vagrant up
I should be able to decide to melt or freeze an ice cream flavor based personal preference

Set up the DevOps Pipeline in Bluemix

As a developer
I want to set up the DevOps Pipeline in Bluemix to build and deploy the project when the master branch changes
So that I can see if the tests are failing remotely

Redundant GET methods

Please list_all_ice_creams and get_popular_ice_cream have redundant method signatures which is causing an error in testing. Please combine these two methods so this error no longer exists. I believe Soumie worked on this so please fix this

List ice-creams by popularity

As a User
I need a way to list the ice creams based on popularity
So that I can easily view the popular ice-creams

Assumptions:
URL should return a list of ice cream flavors

Acceptance Criteria:
When I call the URL /ice-cream?popularity=4
It should return a list of ice cream flavors with popularity greater than or equal to 4.0

Hit & Test the URL of the new service

As a user I want to hit the URL of the new service and test
so that I know it works.

Acceptance Criteria
Hit the URL of your new service and make sure that it works (it can be the same URL if you delete your Cloud Foundry app or a new URL. It's your choice)

Make the routes consistent between methods

Most routes in our icecreams.py file go to @app.route('/ice-creams/<id>', methods=['DELETE'])

Some of them to go @app.route('/flavors/<something else>',

Please change flavors to ice-creams

Update an Ice Cream Flavor

As a developer
I need to create a RESTful way to update an ice cream flavor resource
So that my team members can update an ice cream flavor resource

Acceptance Criteria
After I SSH using the Vagrant file
I can update an ice cream flavor in a RESTful way

Update Vagrantfile with port forwarding for flask

As a developer
I need to update the Vagrantfile with port forwarding for Flask
So that the application can be tested locally

Acceptance Criteria
The Vagrant file should contain
config.vm.network "forwarded_port", guest: 5000, host: 5000

Set up Docker

As a developer
I want to use Docker inside of Vagrant
So that I can install 3rd-party services (like a database) inside of the container

(I also want to pick which database we're using)

Acceptance Criteria
When I go to install the project
I should see a database being installed via Docker

add a numeric id to index ice-cream data

As a developer
When I store ice cream data in Redis
The index of the ice cream should be a numeric ID (not the name that it's currently stored by)
So that I can follow best practices

Create the skeleton api .py file

As a developer
I need to create a .py file which contains all resource definitions of the ice-cream API
So that my team members can reuse the file to implement the stories

Assumptions:
Only method definitions are provided
definitions can be changed during implementation

Query Ice Cream Flavor by some attribute of the Resource

As a developer
I need to create a RESTful way to query an ice cream flavor by some attribute of an ice cream flavor resource
So that my team members can query an ice cream flavor by some attribute of an ice cream flavor resource

Acceptance Criteria
After I SSH using the Vagrant file
I can query an ice cream flavor by some attribute of an ice cream flavor resource

BDD Testing for Action Feature

As a developer
I need to create a BDD testcase
So that the action feature can be tested

Acceptance Criteria:
When I run the command behave
the testcase should pass

List Ice Creams

As a User
I need a way to keep track of the list of ice creams
So that I can easily view the complete list of ice creams

Assumptions:
Add a URL of /ice-creams
URL should return a list of ice creams
In memory persistence is fine for MVP
Acceptance Criteria:
When I call the URL /ice-creams
It should return a list of ice creams as a JSON string.

Delete a Resource

As a developer
I need to create a RESTful service
So that developers can delete resources in the database

Acceptance Criteria:
When I vagrant up
I should be able to delete an ice cream flavor

Create a Cloud Foundry application in Bluemix

As a developer
I want to create a Cloud Foundry application
So that I can deploy my application to IBM's Bluemix

Acceptance Criteria
When I go to the Bluemix website
Then I should see a running Bluemix application
And I should share the SDK with my other team members

Add an automated CI/CD DevOps Pipeline

In Part 3 you will add a DevOps Pipeline to deploy your service automatically. It should also run your tests from Part 2 every time the master branch is updated and every time someone submits a Pull Request. The Pull Request will tell you if all of the tests have passed and you should NOT accept a Pull Request with tests that are failing. This will ensure that the master branch is always deployable.

You will need to:

Create a free account on Travis CI.
Create a .travis.yml file and configure Travis CI to run test cases every time someone pushes to the master branch or submits a Pull Request.
Set up Travis CI to monitor your GitHub repository for push and pull requests.
Set up the DevOps Pipeline in Bluemix to build and deploy your project when the master branch changes.
Connect this DevOps pipeline to the GitHub repository for your project
Add a Test Stage to the pipeline to run your integration tests
Write Stories (as Github Issues) to plan the work needed to create the necessary integrations and add them to your Backlog.
Move these Stories through the ZenHub pipeline as you work on them just like you did in homework 1
(optional) Integrate your Pull Requests with your Slack channel so that any time someone makes a pull request, the channel is notified so someone can approve it.

add .vagrant to .gitignore

As a developer
I need to add .vagrant to the file .gitignore
So that the .vagrant folder is not checked into git

Acceptance Criteria
The .gitignore file should contain the entry -
.vagrant\

Set up Travis CI

As a developer
I want to set up Travis CI to monitor my GitHub repo for push and pull requests
So that I can make sure my tests aren't failing.

BDD Testing for Query Feature

As a developer
I need to create a BDD testcase
So that the query feature can be tested

Acceptance Criteria:
When I run the command behave
the testcase should pass

Ensure Vagrant File Installs Necessary Software

As a developer
I need to update the vagrant file
So that other developers can run vagrant up && vagrant ssh and be able to start developing

Acceptance Criteria
When I view the project in Zenhub
I should be able to vagrant up to get the service running locally

Create a vagrantfile

As a developer
I need to create a vagrantfile
So that my team members can easily get started with the project

Acceptance Criteria
When I go to the Github project
I should see a vagrantfile

Read a Resource by name

As a developer
I need to create a RESTful way to fetch an ice-cream using the name
So that my team members can query an ice cream flavor by a name

Acceptance Criteria
When I call the URL /ice-creams/Vanilla
It should return the data containing ice-cream name = Vanilla

BDD and TDD Automated Testing

In Part 2 we will need a test suite that runs anytime a change is pushed to the master branch on GitHub. This will be the gate in our DevOps Pipeline to merging Pull Requests in Part 3.

You will need to:

Create a BDD .feature file and accompanying .steps file to test your RESTful API from the outside in.
Write the feature using Gherkin syntax that is understood by the behave tool
There should be at least 7 Scenarios in the feature file, one for each of Create, Read, Update, Delete, List, Query, Action
Run these using behave until all scenarios are green (passing)
Create a TDD test_???.py that contains your Unit Tests using PyUnit to test your application from the inside out.
Decide whether you want to use the standard PyUnit syntax or RSpec syntax. The choice is up to you. You only need to use one or the other.
Run these tests using nosetest until they are all green (passing)
Use the coverage tool to measure your test coverage. Your goal is get it above 90% for full credit.
Write Stories (as Github Issues) to plan the work needed to create the test cases and add them to your Backlog.
Move these Stories through the ZenHub pipeline as you work on them just like you did in homework 1
What I am looking for is a demonstration of your understanding of how write good test cases and feature scenarios. I am also looking for good code testing coverage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.