Skip to content

Service Development using Jazz

Surya Jakhotia edited this page Dec 2, 2017 · 12 revisions

Overview

You can start creating your 'serverless' services by using the "Jazz self-service portal". If you haven't already, install the Jazz framework by following instructions here.

Jazz Framework Overview

Supported Services

You can create services of the following types using Jazz framework.

  • RESTful APIs
  • Lambda Functions
  • Static Websites

Request for Service Creation

To create Developer Serverless Services using Jazz Framework - please refer the Jazz UI - Create Services steps.

  1. You need to provide the details below when you create a new service:

Service Type Rest API Lambda Website
Inputs Namespace Name Namespace Name Namespace Name
Service Name Service Name Service Name
Service Description Service Description Service Description
Service Runtime Service Runtime Service Runtime

  1. Jenkins Job - Create service will be called to create the service.

  2. On successful service creation, you could view your new service listed in the services catalog page

  3. When you view the services details, you will be provided with a link to the repository tied to your service.

  4. Your service repository comes with a pre-loaded template for developing your service. You can start committing code and every push to origin will trigger a deployment to update your service.

Development workflow

  1. At this point, you would have received a git url for your service. Clone the repository locally.
  2. You will have a preloaded template depending on your service type & runtime that you have selected. DON'T MISS - Click here & read more to understand these templates before you start making changes to the code.
  3. Once you understand where and what to change, start working on your code to implement your business logic and push the changes to a feature branch. Remember that you should always submit your changes to a feature branch; pushing changes to master branch will fail.
  4. On pushing your changes to a feature branch, a deployment workflow kicks in automatically through Jenkins.
  5. Monitor the jenkins job to get the status of the deployment. The API Service dev url will be displayed in the Jenkins job logs.
  6. Once you see expected results for your service (through the process described in #4 below) on the dev environment, you will have to submit a PR (Pull Request) to merge the changes to the master branch to deploy your changes to production. Read How to create a PR if you are new to creating Pull Requests.
  7. After the code gets reviewed by your peers, they need to approve and merge the changes to master which kicks off a production deployment workflow through Jenkins. You can then monitor your job status in Jenkins as described in #4 below.
  8. Note: Production deployment workflow contains an approval stage which requires manual intervention. You might need to closely monitor this workflow and click on approve during before production deployment stage. This approval stage is only active for 5 minutes and if the stage is not approved manually, workflow will fail. You may need to re deploy the service in this case. The API Service stage & prod urls will be displayed in the jenkins job logs.

Service Deletion

To delete a service,

  1. In Jazz UI's services catalog locate your sevice and then click on "Service Name" to view service details.
  2. Delete the Service by clicking on the Delete Button.

The Delete flow will delete the deployed services from AWS (all environments dev/stage/prod) and will also delete the BitBucket repository codebase of the service.

Monitoring Build & Deployment status for the service

You can find the Jenkins job post the installation setup.

Search for your service name in this page. Find the status of your build/deployment job for the same by clicking on the git branch to which you have committed your changes.

You should be able to see one job per git branch, so that you can quickly check the status of your changes per branch.


Jenkins Server post installation


Jenkins Jobs - Build Java API - stage, prod


Jenkins Jobs - Build Java API - dev