Thursday, June 11, 2020

CI/CD demo using BitBucket pipeline

BitBucket is a Web based version control repository maintenance hosting service owned by Atlassian
for source code that uses Mercurial and Git repositories.
it also integrate easily with other Atlassian products like JiraHipChatConfluence and Bamboo.
It seamlessly works with docker to build and launch docker images and run containers.

Bitbucket is mostly used for code, code review and build CI/CD pipelines. Bitbucket supports the following features:

  • Pull requests with code review and comments
  • Bitbucket Pipelines, a continuous delivery service
  • 2 step verification and required two step verification
  • IP whitelisting
  • Merge Checks
  • Code search (Alpha)
  • Git Large File Storage (LFS)
  • Documentation, including automatically rendered README files in a variety of Markdown-like file formats
  • Issue tracking
  • Wikis
  • Static sites hosted on Bitbucket Cloud: Static websites have the bitbucket.io domain in their URL
  • Add-ons and integrations
  • REST APIs to build third party applications which can use any development language
  • Snippets that allow developers to share code segments or files
  • Smart Mirroring


Steps involved in new repository setup
1. Create Project
2. Create a New Repository
3. edit the bitbucket-pipelines.yml file to create the pipeline
sample pipeline steps
image: python:3.7.3 // required Docker Images

pipelines: //add all pipelines
default: // default or first pipeline to run
- step:
name: development
deployment: dev
caches: // caches is used to, chach multiple dependencies to save time in downloading the dependencies for subsequent builds
- pip
script: # Modify the commands below to build your repository.
- echo "pip dev"
- pip install -r requirements.txt
- step:
name: production
deployment: prod
trigger: manual //trigger = manual will enable user to promote the code to next step in the pipeline
caches:
- pip
script: # Modify the commands below to build your repository.
- echo "pip prod"
- pip install -r requirements.txt

sample pipeline screen looks like this.



sample deployment screen looks like this.



Tuesday, June 11, 2019

Swagger

Swagger is the Framework for designing and creating blueprint of API using common language enabling the development across the whole API lifecycle including documentation, design, development, testing and deployment.
This framework provides set of tools for developers to create client and server code with self-generated documentation for web services.
Swagger API specification officially named as OpenAPI specification
Swagger specification can be written in YAML or JSON


More details and examples are given here

Monday, June 10, 2019

Docker Container


What is container ?
  • Containers are completely isolated environments with it’s own processor, Network and Mounts, But Shares the Host OS Kernel ! and managed by Docker software installed on the OS
  • containers available from many years, some of them are LXC, LXD and LXCFS
  • Docker uses LXC container
  • Docker offers easy and user-friendly utilities and tools to manage the communication between containers and OS Kernel
  • Docker software is specific to OS Kernel so Linux, Windows and Mac will have slightly different Docker software installed on Their OS.
  • Docker containers on VM’s is an ideal situation

more details are given here.



Popular Posts

Blogger templates

Blogroll

About

Powered by Blogger.

Wikipedia

Search results