How to automate the deployment process of static webpage using Jenkins hosted on AWS

For the past few days, I have been trying to link Jenkins to Github and or Bitbucket repos and publish to S3 bucket using AWS


Pre-requisites:

>> Follow the steps of installing Git to your desktop(https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

>>You have an active account on Github and Bitbucket

>>You have a sample html file to added to your repo (Git )

>>You have cloned Git with Github and or Bitbucket

>>You have EC2 instance installed with Jenkins
(https://blog.kukiel.dev/posts/jenkins-in-aws.html)

>>You have IAM user setup with full rights to S3 Bucket

>>You have an S3 bucket created which is public

>>You have the private key and public key
>> You have port 8080 listening to all TCP connections set under ‘security group’ section of EC2


Here we will learn the following:

  • Create a job (to automate) in Jenkins to connect to Github/Bitbucket
  • Enable Jenkins to build post each commit to the repo
  • S3 bucket to publish your static webpage

First, we need to click ‘Manage Jenkins’-> ‘Manage Plugins’
Click on ‘Available’ tab at the top and type ‘S3 Publisher’
Click on ‘Install without restart’ and log off & log in to your Jenkins account

Once we have logged to our Jenkins user account with admin privileges.

 

Choose New item >> Enter the name of the Job

     

Choose Free Style Project and Hit Ok.

Choose Source Code Management tab from the top and Copy paste the ‘SSH’ repository URL


Click Add Jenkins next to credentials

Choose ‘Kind’ as SSH username and private key

Provide some meaningful description

Username: Should be either for GitHub/Bitbucket (username@email.com, so just the username)

(Note even if you are connecting to Bitbucket repo, choose Git option in SCM)
Copy-paste the private key without any whitespaces and paste it under ‘Private Key’ and 

Hit ‘Add’

 

Browse to ‘Build Triggers’ tab at the top and Choose Poll SCM

 

Under ‘Schedule’ type this
H/15 * * * * – which means poll every 15 minutes

(Feel free to read through the help options by clicking the ? Icon for help


Now click the Post Build Actions > ‘Publish artifacts to S3 Bucket’


Type a meaningful name to the S3 Profile

Source as */

Destination bucket as <name of S3 Bucket>

Storage Class as Standard

Bucket Region as <Region your bucket is deployed>


Click Apply and Save.

 

Now you can try a sample commit from your repo and see how Jenkins, starts the build and deploys the codebase to S3 bucket at AWS

 

Browse through the public ip <public-ip>:8080 to see your webpage come to life.

 

Some points to keep in mind:

  • Don’t choose Bitbucket Server plugin for connecting to bitbucket repo, somehow it doesn’t work
  • You can always choose Add Jenkins ->under Credentials-> and choose ‘Kind’ as ‘Username and password’: This would mean you wish to connect using the credentials of your repo (bitbucket/Github)
  • Please leave a comment if you have any questions

 

 

 

How to achieve happiness in what we do?

 

Let’s say you are getting ready for work, and the car breaks down. We almost instantly react by saying we have a problem. Do you have a problem? You develop an unpleasant feeling, and then your mind tries to connect that uncomfortable feeling related to any similar unpleasant experience in the past and eventually anxiety kicks in. Your car may have a mechanical problem and remember they don’t have feelings. The feeling is a natural response to any similar event to the past, which might not be a pleasant one. This is where we as individuals can work on to improve our wellbeing.

Continue reading

Why don’t you need an agile framework to deliver software?

It all started years ago when, as a programmer, we had to meet the customer to understand his needs. Sometimes, it meant engaging in a conversation about how the current system works or to take down notes on what he needs. Those days you had to do that. Phone lines were not enough. Later, when I officially started working for a company, they were scrumming, and I got introduced to scrum then.

Slowly, I realised it’s the people who make it work. It is always about people, rather, their intent, their skills, their effort, their passion, the environment that they operate. Small teams able to work towards a shared vision is all we want.

“A well-functioning team of adequate people complete a project regardless of the process or technology they use (although the process and technology may help or hinder them along the way)” ~ Alistair Cockburn

So let’s take care of our people! Isn’t it? The communication between the team and the customer should be very effortless. As leaders, we need to enable the right environment for them to work cohesively. In fact, if you can work with the customer onsite there are massive benefits, as you can cut short the long feedback cycles. Don’t want to name which methodology advises this; you may have guessed it right. I believe any framework gives us a nice container for the teams to work together in terms of cadence and ceremonies etc. But again the core of all the frameworks are the underlying values which we often forget. And they are human-centric values.

These are some of the essential things which we should keep in mind while working with teams:

  1. Stay close to the customer need
  2. Keep the communication as transparent as possible with the customer
  3. Deliver a meaningful piece of the product continuously
  4. Get feedback as soon as possible and pivot based on that.
  5. Incorporate feedback and delight the customer.

If our delivery process can cater to the above procedures, we don’t need any framework.

Please do let me know your thoughts.

System Thinking…Not Just a tool

Everything around us is a set of interrelated elements that contribute to the formation of a larger system to achieve a defined goal. System Thinking is when we look at the whole process from a broader perspective rather than the individual component.

Systems thinking refers to the process of understanding how things influence one another within a whole structure. It’s just like the ecosystem, where every element (air, water, plants, and animals) work towards one common goal of survival. Similarly, in our work, the components would include people, processes, structure, relationships, emotions affecting or balancing each to create a healthy and happy working space. Remember, to improve the overall performance, there has to be a continuous attempt towards learning the system elements and their inter-relationships.

Many think that systemic thinking is a set of tools that can be used as various diagrams etc. but it is more than just a tool. It is a holistic approach to understand the complex system as a whole and helps interrelate how systems work overtime and within the context of larger systems or components. It’s not a straight line, rather a zig-zag way of learning by experiments. All we have to do is to be mindful of identifying the various parts and how they affect the whole system in perfect harmony.

System Thinking Helps Avoids Future Problems

Adapting to system thinking changes people’s mindset and helps improve our curious and innovative thinking process.

Any sort of problem-solving requires systems thinking. Remember everything is interconnected; we just need to understand how, where and why. That’s why it is important to understand, identify and find the right explanations to find the right solution. Understand how each element at work or project impacts and influences each other. Start with learning the tools for the future, keep an open mindset, take challenges, overcome your fears, seek questions, talk, share your thoughts and pique your curiosity. As someone rightly quoted “Today’s problems are often a result of yesterday’s solutions”. 

It is pretty common to increase the number of resources to finish a project on time; however, the end goal or customer problem may or may not be met. System Thinking helps understand the reasons or situations that lead towards not getting that goal and also offers solutions to improve results.

Using System Thinking in Agile Processes Helps Identify The Right Points To Act-On

Using the human body as an example, when you are ill, you feel pain at certain points in your body. You visit the doctor, they ask you some questions, and they probably prescribe some medicine for your ailment. Depending on the ailment, the doctor will prescribe medication that will target that part that is not well. Modern drugs/medicines claim to be effective in solving that part of your body but there is a set of people who think that healing your body is closely associated with your mind. It is quite proven that positive thinking can have long term benefits over your body and mind which is a systematic way of self-healing.

Similarly in agile, software delivery is one of the areas of improvement for many organizations. Many may think, it is just simply delivering more products faster, however, there are smaller organizations that are spending a lot of time understanding the basic need of customers first. They are running many small experiments that fail after many months of analysis but that they are de-risking themselves in introducing the wrong product to the market..If the right leverage points are spotted, it will be easy for the issues to be addressed, ensuring better results are achieved in a shorter time.

How to Apply System Thinking in What We Do?

  1. Identify the right problem – We need to understand and stay close to the problem statement as much as possible. We should know how the story is being told and how do the actors play their roles. 
  2. Current condition – We need to clearly articulate the current situation at hand. Derive any behaviors in play and plot a diagram of each variable over time
  3.  Target Condition: We are able to define how does success look like for the problem at hand
  4.   Match it with the System archetype – We need to be able to put a finger on the common   8 system archetype’s that matches and get some insights. Based on the complexity it might be a mix of multiple archetypes
  5.  What obstacles are in play – What are the current obstacles and how do they affect or contribute to the problem
  6.  What are our next steps: What are the next steps that can be taken to understand the various variables and their relationship
  7.  Show and Learn – How soon can we showcase and learn from the step that we tookRepeat the steps again!!

When Should We Use Systems Thinking?

  • The issue is repetitive and not a one-time disruption/problem
  • You want to explore more options
  • You want to get to the systematic cause of the issue
  • Promote inquiry and challenge preconceived ideas

Where Should Agile Coaches start With System Thinking?

  1. Avoid blaming the team for the issue. This will help build trust for the next steps
  2. Involve the team to describe the problem from all angles: Events, patterns, and structure (‘See the Iceberg, not just the tip’)
  3. Trigger a curious mindset to understand the problem. Instead of jumping to solutions talk about different scenarios and then seek the best option to resolve it.
  4. Involve people from different teams to get their thoughts. Fresh perspectives are great!
  5. Ask powerful questions! How does our participation in the system and our way of describing it affect what we are observing? What are the key emergent properties of the system that could not have been predicted by simply looking at the individual parts of the system? What is the wider context that the system in question operates in?

How Can System Thinking Help Agile Coaches

Agile coaches can greatly benefit from System Thinking because at any point in time there are no right or wrong combinations. It is just hitting the nail in the matter of the right conditions… While some questions will narrow our assumptions, some may confirm our assumptions. It is a very experimental way of thinking where elements will evolve and their relationships too. Like some say that extreme programming is a set of technical practices, however, many types of research have proven that practices like continuous integration help build the culture of the team/organization, listening to the feedback and adapting to them. I leave you with this thought to run experiments and learn from them…

A4 Sample Template for System Thinking

Learning Canvas (Sample)

Ref: SystemThinker Website

So can Agile and Lean work together?

Organizations globally have adapted Agile in some way or the other. Scrum being widely accepted as a framework to implement the principles of agile. This all started in 90’s with the first agile project being C3 (Chrysler Comprehensive Compensation System). When Agile started, it advocated adaptive planning, evolutionary development, early delivery, and continuous improvement to encourage rapid and flexible responses to change. On the other hand Lean adapted from the Toyota Production Company; the focus is aggressively on the below:

1.           Eliminate waste

2.           Amplify learning

3.           Decide as late as possible

4.           Deliver as fast as possible

5.           Empower the team

6.           Build quality in

7.           See the whole

Let’s try to weave them together:

Continue reading

Convincing People

Not just logical appeal would let you convince or win hearts of people.  You really have to win the emotions of people. We have to tap into the hearts and bellies of the listeners.

We have to align to the values of the listeners. Lets say you have two colleagues, one who pays importance to financial aspects in his life and the other one likes to be the center of attraction to the crowd. If you want both to be aligned for a software that is to be introduced to the organisation then you need to approach with a strategy.

Continue reading

Steps to improve Team Velocity

An agile team’s velocity is dependant on how many stories were picked up in a sprint and executed. Scrum framework lays emphasis on committing to work with sustainable pace. Basically, velocity is the speed at which the team moves forward.

Leadership lays a lot of importance on how the agile teams can be made more productive and efficient.  That brings down to scrum master ownership, on how he can help the teams to improve the velocity over a period of time.

Some of steps that can be beneficial in improving the velocity are:

Continue reading

Why is continuous delivery not just a technical practice?

Continuous Delivery is a practice that emerged from XP(Xtreme Programming) and is definitely not new. It goes back to the early days when Kent Beck and his team were doing it.

The practice of software delivery is far from perfect today.  Implementing Continuous Delivery not only solves technical challenges, but also enhances the development environment. Here are a few reasons why adapting continuous delivery can help businesses seek competitive advantage:
Continue reading

Become a better LEADER not just a MANAGER

Good leaders don’t just happen overnight and it takes time and experience to rise into leadership roles.

In IT industry we use the word “resource” which in my opinion is a bit harsh. They are just people…

Leadership is a skill and being a leader has nothing to do with a rank. Leadership is a choice which one opt’s for the people.

We human’s are not machines. We have emotions and need to become people centric. Organisations need good leaders to drive inspiration and offer continuous coaching, so that people can follow them in their movement and fulfill the goals of the companies successfully.

“leaders are not responsible for results but are rather responsible for people, who are ultimately responsible for results”.
Continue reading