Code Monkey home page Code Monkey logo

lab-agile-zenhub's People

Contributors

rofrano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lab-agile-zenhub's Issues

Add License to README.md

As a Developer
I need to display the license for my repository
So that everyone will know under what legal conditions they can use it

Details & Assumptions:

  • We will use the Apache License

Acceptance Criteria:

Given the license is added to the README.md file
When I view the repo
Then I should see a badge for Apache License

Set up a DevOps Pipeline for continuous deployment into IBM Cloud Kubernetes (IKS)

As a Developer
I need to automate the continuous deployment of my service
So that I don't have to waste time deploying it manually

Assumptions

  • We will use the IBM Continuous Delivery Services in IBM Cloud
  • We can connected Continuous Delivery Service to our GitHub repo
  • When we push to master a new build will deploy into Kubernetes

Acceptance Criteria

When I `git push origin master`
And I go to the IBM Continuous Delivery Services web page
Then I should see the application bas been deploy to Kubernetes

Need Swagger API documentation

As a User
I need the API documented in Swagger
So that I can easily understand how to use the API

Assumptions:

  • We can leverage the Swagger support for Python
  • We can annotate the code to support Swagger documentation generation
  • The documentation endpoint is on the /api-docs URL
  • Story #1 is completed

Acceptance Criteria:

When I follow the /api-docs URL
It should return the documentation JSON in Swagger format

Make the hit counter deployable in Docker

As a Developer
I need the ability to deploy the service in a Docker container
So that I have more deployment options than just Cloud Foundry

Assumptions:

  • The alpine:python Docker image should be used as a base
  • The shell parameters from the Vagrantfile can be used as a starting point

Acceptance Criteria:

When I issue docker build -t hitcounter .
A proper Docker image should be built
And when I issue docker run -d hitcouner
And I issue docker ps
I should see a hitcounter container running

Add required files to deploy service on Kubernetes

As a User
I need the service to be publicly available on Kubernetes
So that I can use it from the Internet

Assumptions

  • The Kubernetes manifests will be in a folder called ./deploy
  • Need to add a deployment.yaml file to specify the deployment parameters
  • Need to add a service.yaml file to specify the service

Acceptance Criteria

Given I have created the required files to deploy service on Kubernetes
When I issue a `kubectl apply -f deploy`
Then the service successfully deploys to Kubernetes

Update the Devcontainer definition to include Redis

As a Developer
I need my local development environment to include Redis
So that I can test the service locally with no Internet connection required

Assumptions:

  • The docker-compose.yml file will add Redis while building the environment
  • We can use a Redis Docker image
  • alpine:redis should be used to keep the vm small

Acceptance Criteria:

Given I have started Visual Studio Code and Reopened in a Container
When I issue `docker ps` in a separate shell
Then I should see a `redis` instance running

Develop a REST API to create a counter service

As a User
I need a way to create a counter
So that I can easily keep count of how many times something was done

Assumptions

  • The base URL would be /counters/<name>
  • URL should return a number that gets incremented every time it is called
  • In memory persistence is fine for MVP

Acceptance Criteria

Given the server is available
When I call the URL `GET /counter/<name>`
Then it should return the number of times it has been called as a JSON string in the format:

The Results should look like this?

{
    <name>: <count>
}

Where <name> is the number of name of the counter and <count> is the current count.

Deploy to IBM Cloud

As a Service Provider
I need my code running on the cloud
So that people can get to my web site

Assumptions:

  • We will use IBM Cloud
  • We wish push manually just to make sure it works in IBM Cloud

Acceptance Criteria:

Given ...
When ...
Then ...

Make the hit counter persistently survive service restarts

As a User
I need the hit counter to persist the last known count
So that I don't loose track of the count after the service is restarted

Assumptions

  • We will use Redis as the persistent store
  • A Redis service from Bluemix should be used

Acceptance Criteria

Given the hit counter is at 1
When I advance the hit counter to 2
And I restart the hit counter services
And I call the hit counter URL
Then I should see 3 returned from the service

Need the ability to reset the counter

As a User
I need the ability to reset the counter
So that I can start counting something new

Assumptions:

  • We can zero the counter

Acceptance Criteria:

When I call 'POST /counter'
It returns the current counter value
When I call 'POST /counter/reset'
It returns zero (0) as the counter value
When I call 'POST /counter' after a `reset`
It returns a counter value of `1`

Add the ability to use multiple counters

As a User
I need the ability to create multiple hit counters
So that I can keep track of multiple things

Assumptions:

  • The name of the counter to use should be pass in by the user
  • A call to GET /counters should list all counters
  • A call to GET /counters/foo will operate on the foo counter

Acceptance Criteria:

When I call GET /counters
I should see a list of counters as a JSON string
When I call GET /counters/foo
I should get the current counter value for the foo counter
When I call POST /counters/foo
It should increment the foo counter and return he current value

Create a skeleton Flask project to seed repo

As a Developer
I need some starter code
So that I can start adding features to it

Assumptions

  • We will be using Python with Flask
  • It should run on port 8000 by default
  • It should also set up a testing skeleton as well

Acceptance Criteria

Given there is a skeleton app
When I issue a `git clone` on the project
Then I should get a minimal Flask application
When I run `python server.py`
Then I should have a Flask server running at `localhost:8000`

Add the Redis service to the Kubernetes Manifests

As a Service
I need a Redis service specified in the Kubernetes manifest
So that it gets connected each time the hit counter service is deployed

Assumptions

  • There is a Redis service created in the Kubernetes namespace
  • We can edit the deployment.yaml file to include credentials to this service

Acceptance Criteria

Given the manifests have been created
When I push the hit counter service to Kubernetes
Then it should have a Redis service bound to it

Need the ability to remove a counter

As a User
I need a way to remove a counter from the list
So that it no longer shows up in the list of counters

Assumptions:

  • We can delete a counter in Redis

Acceptance Criteria:

Given that the counter `foo` exists
When I issue `GET /counters`
I should see `foo` in the list of counters
And I issue `DELETE /counters/foo`
Then the `foo` counter should be deleted
When I issue `GET /counters`
I should not see `foo` in the list of counters

Add Remote Container support so that developers can work locally

As a Developer
I need a way to work locally with Visual Studio Code and Docker
So that I can work independantly without the need for external databases

Assumptions:

  • Use Docker and Visual Studio Code with the Remote Containers extension to build a local dev environment
  • Python will be used for development
  • Redis will be used for the database

Acceptance Criteria

Given I have issue `git clone` on the project
And I change into the project folder
When I issue `code .`
And I select Reopen in Container
Then I should have a complete development environment on my workstation

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.