Skip to main content

Posts

HTTPS for Local Development

  Switching between HTTP to HTTPS for Local Development There are millions of developers who write web applications every day. While writing these  applications generally they run them locally or in the test environment to test the functionally, before releasing them to production. These applications expose HTTP endpoint using which they can be accessed and tested. Some times it requires to test the same application using HTTPS. I came across with this use case while working on CloudWatch Metric Streams, where I wanted to send the CloudWatch Metric Streams data to the monitoring solution using Kinesis Data Firehose, and it only accepts HTTPS endpoint. To accomplish the task I wrote one spring boot application . I was running this locally and it was exposing the HTTP endpoint, and the same endpoint can not be used in the Kinesis Data Firehose. It should expose HTTPS Endpoint.  There are many ways to expose the HTTPS endpoint and using ngrok it can be easily done. Install ngrok in Ubuntu
Recent posts

Citizenship Amendment Act

The Citizenship Amendment Bill has now become the Citizenship Amendment Act.  Protests Against It There have been massive protests against it in different corners of the country In Assam,   in the rest of the north eastern states, in West Bengal, Kerala, Karnataka, Uttar Pradesh, and even in Delhi, protests took place Most of the protests were non violent and peaceful but violence erupted in some places like the West Bengal, where a train was set on fire For instance in   Delhi, where some buses were set on fire. Appeal to Peoples  I'd like to say that, all the people who are protesting, you need to be extra sure to ensure that all the protests remain non-violent because you are going to gain nothing out of setting fire to public property What will happen is that, when any protest turns violent, you will not only lose public support but the government will get another excuse to use the police force against you more brutally, to attack you, to fit you into the
Monitor Any Java Process With Jolokia Hello, friends, I am writing this post because I struggled a lot to find out the solution for this. I was having a running java application on my machine and I wanted to monitor the performance  of that application. There are various tools to monitor the java process like: JConsole Jolokia You will find many posts about monitoring java process through JConsol, So let's not discuss that topic here anymore. In this post, we are going to discuss the Jolokia. To Monitor any java process via Jolokia fellow below steps: Download Jolokia JVM agent from here: https://jolokia.org/download.htm l e.g.  jolokia-jvm-1.5.0-agent.jar Assuming that you are having a running java process in your machine with PID  1234 Start the Jolokia JVM agent by running below command to monitor a java process java -jar jolokia-jvm-1.5.0-agent.jar start 1234                  Here 1234 is a process id, in which java process is runn
How to install Salt-Master with Salt-API in Docker Container In this guide, we will create a docker image with salt-master and salt-api installed on it. later we will use the same image to create the container. Clone the repo: git clone https://github.com/yogeshprasad/salt-examples.git Change the dir: cd /root/salt-examples/build-salt-master-api Build the docker image: docker build -t "salt-server-img" . Create the container: docker run -ti --name="my-salt-server" salt-server-img bash Test the api: curl -k https://172.17.0.2:8553/login -H "Accept: application/x-yaml" -d username='admin' -d password='password' -d eauth='pam 172.17.0.2 : It is a container private IP.
How to assign static public IP to the docker container   In this post, we will create a docker container and configure the static public IP so it will be reachable from outside. Here we will use the Linux  MAC VLANs and Virtual Ethernets. Prerequisites:     Ubuntu host up and running. Public IP should be configured. Docker should be installed. Skip to end of metadata Go to start of metadat PULL UBUNTU DOCKER IMAGE $  docker pull    ubuntu:14.04.5 It will download the Ubuntu docker image. Create a container $  docker run -ti --name container-1    --net=none --privileged=true ubuntu:14.04.5 bash This will create a docker container, now we will configure the static public ip to the container. ASSIGNING AN IP FOR A CONTAINER Here I am assuming that host machine is having interface "eth0" with public IP configured.  Name of the container is container-1.  The below steps needs to be performed on the docker host. Create a vir
Running Salt Minion In Docker Container From Scratch  In this post, we will install salt minion in docker container and configure the public IP so it will be reachable from outside. Prerequisites:     Ubuntu host up and running. Public IP should be configured. Docker should be installed. Skip to end of metadata Go to start of metadat PULL UBUNTU DOCKER IMAGE $  docker pull    ubuntu:14.04.5 It will download the Ubuntu docker image. Create a container for salt minion $  docker run -ti --name salt-minion-agent    --net=none --privileged=true ubuntu:14.04.5 bash This will create a container, we will use the same container to install salt minion. Now configure the network for this container. ASSIGNING AN IP FOR A CONTAINER Here I am assuming that host machine is having interface "eth0" with public IP configured.  Name of the container is salt-minion-agent.  The below steps needs to be performed on the docker host. Create a
Running Salt Master In Docker Container From Scratch  In this post, we will install salt master in docker container and configure the public IP so it will be reachable from outside. Prerequisites:     Ubuntu host up and running. Public IP should be configured. Docker should be installed. Skip to end of metadata Go to start of metadat Pull Ubuntu docker image $  docker pull   ubuntu:14.04.5 It will download the Ubuntu docker image. Create a container for salt master $  docker run -ti --name salt-master-server   --net=none --privileged=true ubuntu:14.04.5 bash This will create a container, we will use the same container to install salt master. Now configure the network for this container. Assigning an IP for a container Here I am assuming that host machine is having interface "eth0" with public IP configured.  Name of the container is salt-master-server.  The below steps needs to be performed on the docker host. Cre