Set up private blockchain with Ethereum (part 2)

In my previous post I set up a network of two nodes running a private blockchain. In this post I use it to create accounts, mine some ether and browse the blockchain with the Mist browser on my Mac.
First I make sure the nodes are up and running. Then I go to the ‘geth’ console that runs on node1.
When I enter the command web3.eth.accounts in the console to show all available accounts on this node the result will be an empty array: [].
To create an account I run in the console:
personal.newAccount("Write here a good, randomly generated, passphrase!") Continue reading

Posted in ethereum | Tagged , | 2 Comments

Set up private blockchain with Ethereum (part 1)

I don’t think it needs introduction about the current hype that is going on with Blockchain, bitcoin, Ethereum and other initiatives. To get more feeling about what it is and how it works I decided to have a go with Ethereum as it promises to be a possible disruptive solution for lots of different use cases. Without going into the theoretical background of Blockchain or Ethereum (there are already lots of docs written about it) this post will focus on how I set up a private Ethereum network on my MacBook. I will use Docker containers as Ethereum nodes and use Mist browser on my Mac to ‘connect’ to the private network.

Please note that this is just a possible setup that works for me. There might be better/easier alternatives for other use cases.

I perform the following steps to create a private Ethereum network: Continue reading

Posted in ethereum | Tagged , | 1 Comment

Getting started with Python on Spark

At my current project I work a lot with Apache Spark and running PySpark jobs on it. For those who also want to get their hands dirty with Spark in combination with Python I can recommend this course at Udemy. It gives a broad introduction about Spark in general, the different modules like ‘Spark Streaming‘, ‘Spark Sql‘, ‘MLlib‘ and ‘GraphX‘, and how to use Python to make use of the Spark system.
It also explains how you can run your own cluster in the cloud with AWS EMR about which I wrote several post before. And no worries, after completing this course there is still lots more to discover about Spark 😉 but like I said this should be sufficient to get started.

Posted in Spark | Tagged , | Comments Off on Getting started with Python on Spark

Small hack to avoid SSL validation in Spring RestTemplate

As you might notice from my previous posts I am a big fan of Spring Framework. A few weeks back, for example, I needed to set up a REST API client to be able to test some things in our Development environment. By using Spring Boot and RestTemplate I was able to create this quickly. Unfortunately I ran into the issue that the API endpoint was using a SSL certificate that wasn’t supplied by a trusted ‘default’ CA. So in this case I wanted to switch this SSL validation of in the RestTemplate. Continue reading

Posted in Security, Spring Framework | Tagged , | 1 Comment

AWS DevOps Engineer- Professional: Got it!

When you have a look at the archives of my blog you might notice that I haven’t written any blogs for the last few months. The reason was simple: lack of time. I had decided to not only renew my existing AWS certificate but take that to the next (and highest) level, DevOps Professional, and also get the more generic Solution Architect – Associate one. Two months ago I got the Solutions Architect one which was actually not that difficult. But to get the Professional level took a bit more preparation. Nevertheless last Friday I successfully took the (almost 3 hours taking) exam and got the certificate:

So with this certificate added to my list my collection of badges look like this:

If you want to validate an AWS certificate you can use the following link: verification. My validation number is 24KQF0WKKMF4Q63B if you want to test it 🙂

Posted in AWS | Tagged | Comments Off on AWS DevOps Engineer- Professional: Got it!

Use Spring Cloud Config as externalized configuration

One of the most important practices when it comes to continuous delivery is building your binaries only once and use that one in the different environments (dev, test, acceptance, etc). This means that most likely you will need to externalize your configuration of your application. With Spring Boot applications it comes down to keep the values of your properties in your outside of your application jar. By doing this you can use the same jar for deployments on different environments (An alternative is to package the values of the properties for all possible environments with your jar but I don’t consider that as a good practice in most situations).
Especially when you are building and deploying Spring Boot applications you should have a look at the Spring Cloud Config project. In this post I will go through the steps as described here and you will see how to setup your own configuration service in just a few steps. Continue reading

Posted in Continuous Delivery, Spring Framework | Tagged , , | 2 Comments

Pipeline as code with a Spring Boot application

This is the last in a serie of posts about continuous delivery based on my local Docker compose stack (see the first and second post here). In this post I use a simple Spring Boot project to show how to make use of the ‘pipeline as code‘ concept. Please note that this is only an example and much, much more is possible. The application I use is taken from the Spring Boot site. The Jenkinsfile is inspired by the one in this post but I had to modify some things to have it work with my stack. The sources of my project can be found here. I will explain the most important snippets in this post. Continue reading

Posted in Continuous Delivery, Git, Jenkins, Spring Framework | Tagged , , , , | 4 Comments

Configure Jenkins for Continuous Delivery of a Spring Boot application

Continuous DeliveryIn my previous post I described how I started a continuous delivery stack with one simple command. The next step is to prepare the stack to build and deploy an application in an automated way. In this post I describe how to configure the stack so it is ready for processing a simple Spring Boot application.
Although I have the components running as Docker containers they still need configuration to have them work together, especially Jenkins. Continue reading

Posted in Continuous Delivery, Docker, Jenkins | Tagged , , , | 4 Comments

Set up your own Continuous Delivery stack

downloadLast week I wanted to try new things with ‘pipeline as code’ with Jenkins. The best way to try new things is running it as Docker containers. This way I can keep my MacBook clean and don’t mess up existing stuff I am working on (also see this article about what Docker can offer for a developer). Another big advantage by using Docker is that there is already a complete stack of Dockers available to set up the necessary tools. However, for some unclear reason this stack didn’t work on my MacBook (see this issue) so I took this opportunity to build my own stack with some Dockers of my own choice :-).
The tools in my stack are:

  • Nexus (as Maven repository)
  • Gitlab (to host the sources of my Java projects)
  • Jenkins (of course to make use pipeline as code)

Continue reading

Posted in Continuous Delivery, Docker, Jenkins | Tagged , , , , , | 3 Comments

Using NAT Gateway instead of NAT Instance with AWS VPC

imgresI recently bumped into my own post of some time ago in which I describe how to add a NAT instance to your private subnet to have access to the internet to install packages etc. Although this still works some time ago AWS introduced the NAT Gateway which in most cases makes life much easier.
In this post I show you how to set up the NAT Gateway instead of using the NAT instance. To get the same start situation as the original post I created this CloudFormation script that creates a VPC with two private and public subnets. When these are in place I can create an EC2 instance in both the private subnet and in the public one, as I also described in the original post. Continue reading

Posted in AWS, cloud | Tagged , , | Comments Off on Using NAT Gateway instead of NAT Instance with AWS VPC