<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7634363475980039786</id><updated>2025-02-21T03:45:23.472+01:00</updated><category term="Spring-boot"/><category term="Java"/><category term="Gradle"/><category term="JPA"/><category term="SCRUM"/><category term="Spring"/><category term="Agile"/><category term="Embedded"/><category term="Guice"/><category term="Jersey"/><category term="Kanban"/><category term="Management"/><category term="Microservices"/><category term="Planning"/><category term="Poker"/><category term="Project"/><category term="REST"/><category term="Scala"/><category term="Spring Framework"/><category term="AOP"/><category term="AWS"/><category term="Ansible"/><category term="Ant"/><category term="Azure"/><category term="Build"/><category term="CD"/><category term="CI"/><category term="Cache"/><category term="Commands"/><category term="DevOps"/><category term="Docker"/><category term="ESB"/><category term="Gatling"/><category term="Grafana"/><category term="Groovy"/><category term="Hazelcast"/><category term="Hystrix"/><category term="InfluxDB"/><category term="JEE"/><category term="JavaEE"/><category term="Jenkins"/><category term="K8S"/><category term="Kubernetes"/><category term="Load Test"/><category term="Maven"/><category term="Performance Test"/><category term="Project Management"/><category term="Tools"/><category term="continuous delivery"/><category term="continuous integration"/><category term="fatjar"/><category term="git"/><category term="gitlab"/><title type='text'>About programming and more</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-8362261097309844017</id><published>2024-06-25T16:08:00.008+02:00</published><updated>2024-11-08T12:27:35.006+01:00</updated><title type='text'>Dependency Injection for Beginners</title><content type='html'>&lt;p&gt;&amp;nbsp;In this article I will try my best to explain DI for beginners.&lt;/p&gt;&lt;p&gt;First we start with the definition:&lt;/p&gt;&lt;p&gt;DI is a design pattern that is helping to implement loose coupling between classes and their dependencies.&lt;/p&gt;&lt;p&gt;So are a lot of buzz words in the above sentence, let&#39;s try to dive into it to explain them better.&lt;/p&gt;&lt;p&gt;What means loose coupling?&lt;/p&gt;&lt;p&gt;For example we can create a class that is searching for users in a RDBMS and we will call our class UserDAO:&lt;/p&gt;
 &lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
public class UserDAO {
    private final DataSource dataSource;           
    
    public UserDAO(final DataSource dataSource) {
        this.dataSource = dataSource;
    }
    
    public User findById(final Long id) {
        //logic to search for user by id in the database
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now, by having the following class we can create a UserService which depends on the UserDAO.&lt;/p&gt;&lt;p&gt;First let&#39;s create the UserService without using DI design pattern:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
public class UserService {
    private final UserDAO userDAO;           
    
    public UserService(final DataSource dataSource) {
        this.userDAO = new UserDAO(dataSource);
    }
    
    public User findById(final Long id) {
        return userDAO.findById(id);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;As you can see, instead to inject the UserService dependency from outside, we are simply creating the UserDAO instance in the UserService constructor.&lt;/p&gt;&lt;p&gt;This approach is leading to make the code overall less maintainable for bigger projects, because if we change the way how UserDAO is created, then also UserService will need to know that and needs to be changed as well.&lt;/p&gt;&lt;p&gt;A better way will be to simply change the UserService following DI design patter, basically instead to create the UserDAO instance inside UserService constructor we simply pass a UserDAO object from outside and this way the only thing that UserService should know are the methods defined in UserDAO:&lt;br /&gt;&lt;/p&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
public class UserService {
    private final UserDAO userDAO;           
    
    public UserService(final UserDAO userDAO) {
        this.userDAO = userDAO;
    }
    
    public User findById(final Long id) {
        return userDAO.findById(id);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;In this way we delegate the responsibility of creating UserDAO instance either to a centralized module which will handle it or we can easy use it with a DI framework like Spring, without major code changes.&lt;/p&gt;&lt;p&gt;Now by having the DI pattern in place we can go down the line and transform UserDAO in a interface, without impacting UserService code:&lt;/p&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
public interface UserDAO {
    User findById(final Long id);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;In the next step we can create 2 implementation for UserDAO, one for RDBMS (JDBC) and second for MongoDB:&lt;/p&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
public class JdbcUserDAO {
    private final DataSource dataSource;           
    
    public JdbcUserDAO(final DataSource dataSource) {
        this.dataSource = dataSource;
    }
    
    @Override
    public User findById(final Long id) {
        //logic to search for user by id in the database
    }
}

public class MongoUserDAO {
    private final MongoDataSource dataSource;           
    
    public MongoUserDAO(final MongoDataSource dataSource) {&lt;br /&gt;        this.dataSource = dataSource;
    }
    
    @Override
    public User findById(final Long id) {
        //logic to search for user by id in the Mongo database
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;By performing the above refactoring now we can create instance for UserService which can search either in the a relational database or in a MongoDB without changing any single line of code in the user service:&lt;/p&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
UserDAO jdbcDao = new JdbcUserDAO(dataSource);
UserService jdbcService = new UserService(jdbcDAO);

UserDAO mongoDao = new MongoUserDAO(dataSource);
UserService mongoService = new UserService(mongoDao);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;As you can observe the 2 instance even if they look almost identical they can perform different operations.&lt;/p&gt;&lt;p&gt;If do you have any questions, please use the comments section.&lt;/p&gt;

</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/8362261097309844017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2024/06/dependency-injection-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/8362261097309844017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/8362261097309844017'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2024/06/dependency-injection-for-beginners.html' title='Dependency Injection for Beginners'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-2008103469455917902</id><published>2024-02-12T12:51:00.012+01:00</published><updated>2024-03-20T18:45:25.200+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="K8S"/><category scheme="http://www.blogger.com/atom/ns#" term="Kubernetes"/><title type='text'>Public Cloud Kubernetes</title><content type='html'>&lt;h2 style=&quot;text-align: left;&quot;&gt;&amp;nbsp;Introduction&lt;/h2&gt;&lt;div&gt;Kubernetes, short K8S, is a container orchestration system used software deployment, scaling and management.&lt;/div&gt;&lt;div&gt;K8S is having many benefits but also downside and when the decision to use it or not should be taken after an in depth analysis of project and product needs.&lt;/div&gt;&lt;div&gt;In this post I will explain a little bit when to use it and when not to use, but also I will provide practical examples for how to deploy a K8S cluster on 2 of the major public clouds: Azure and AWS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;When to and when not to&lt;/h2&gt;&lt;div&gt;K8S is quite complex, is having a high learning curve and the expertise need it to operated is not so easy to be found.&lt;/div&gt;&lt;div&gt;Taking into account the level of complexity, your team should perform an in depth analysis before taking the decision to use K8S.&lt;/div&gt;&lt;div&gt;There are plenty situations when it make sense to use it, but for majority of new startups or green field projects generally might be an overkill and instead to bring you the desired productivity might delay your time to market.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;When to&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Complex architecture based on Microservices.&lt;/li&gt;&lt;li&gt;Your product is processing a huge amount of requests/s.&lt;/li&gt;&lt;li&gt;Multi-tenant applications.&lt;/li&gt;&lt;li&gt;Data pipelines which are processing large datasets.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I am not mentioning CI/CD, because in todays world any tool that doesn&#39;t work well with popular CI/CD tools you should not use it anyway.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;When not to&lt;/h3&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;You already have a working solution and doesn&#39;t look like you will reach soon the load that will require K8S&lt;/li&gt;&lt;li&gt;You don&#39;t have the expertise inside your team&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Generally you should not use K8S until you understand what problem you have and if K8S will really solve it.&lt;/div&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;K8S on Azure&lt;/h2&gt;&lt;div&gt;For this task we can choose from 4 different orchestration tools:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/overview&quot; target=&quot;_blank&quot;&gt;Azure ARM templates&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview?tabs=bicep&quot; target=&quot;_blank&quot;&gt;Azure Bicep&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/developer/ansible/overview&quot; target=&quot;_blank&quot;&gt;Ansible for Azure&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://learn.microsoft.com/en-us/azure/developer/terraform/overview&quot; target=&quot;_blank&quot;&gt;Terraform for Azure&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I will suggest using Bicep, Ansible, or Terraform out of the four, but since Terraform is what most organizations use, we will utilize it for this example.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;We must take the following actions in order to achieve our goal:&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Install and Configure Terraform&lt;/li&gt;&lt;li&gt;Download kubectl&lt;/li&gt;&lt;li&gt;Create a random value for the Azure resource group name using random_pet&lt;/li&gt;&lt;li&gt;Create an Azure resource group using azurerm_resource_group&lt;/li&gt;&lt;li&gt;Access the configuration of the AzureRM provider to get the Azure Object ID using azurerm_client_config&lt;/li&gt;&lt;li&gt;Create an AKS cluster using azurerm_kubernetes_cluster&lt;/li&gt;&lt;li&gt;Authenticate to Azure via Azure CLI&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;h3&gt;AKS Terraform implementation&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;1. Create a file called providers.tf and add the following code in order to configure terraform:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
  &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;div&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;terraform &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #cf8e6d;&quot;&gt;required_providers &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;azapi &lt;/span&gt;= {&lt;br /&gt;      &lt;span style=&quot;color: #c77dbb;&quot;&gt;source  &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azure/azapi&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;version &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;~&amp;gt;1.5&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;azurerm &lt;/span&gt;= {&lt;br /&gt;      &lt;span style=&quot;color: #c77dbb;&quot;&gt;source  &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;hashicorp/azurerm&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;version &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;~&amp;gt;3.0&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;random &lt;/span&gt;= {&lt;br /&gt;      &lt;span style=&quot;color: #c77dbb;&quot;&gt;source  &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;hashicorp/random&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;version &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;~&amp;gt;3.0&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;time &lt;/span&gt;= {&lt;br /&gt;      &lt;span style=&quot;color: #c77dbb;&quot;&gt;source  &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;hashicorp/time&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;      &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;version &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;0.9.1&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;provider &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azurerm&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #cf8e6d;&quot;&gt;features &lt;/span&gt;{}&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;skip_provider_registration &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;2. Create a file to generate ssh keys called ssh_keys.tf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cf8e6d; font-size: 9.8pt;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73; font-size: 9.8pt;&quot;&gt;&quot;random_pet&quot; &quot;ssh_key_name&quot; &lt;/span&gt;&lt;span style=&quot;font-size: 9.8pt;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;prefix    &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;ssh&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;separator &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;&quot;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azapi_resource_action&quot; &quot;ssh_public_key_gen&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type        &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;Microsoft.Compute/sshPublicKeys@2022-11-01&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;resource_id &lt;/span&gt;= azapi_resource.ssh_public_key.&lt;span style=&quot;color: #c77dbb;&quot;&gt;id&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  action      &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;generateKeyPair&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;method      &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;POST&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;response_export_values &lt;/span&gt;= [&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;publicKey&quot;&lt;/span&gt;, &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;privateKey&quot;&lt;/span&gt;]&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azapi_resource&quot; &quot;ssh_public_key&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type      &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;Microsoft.Compute/sshPublicKeys@2022-11-01&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;name      &lt;/span&gt;= random_pet.ssh_key_name.&lt;span style=&quot;color: #c77dbb;&quot;&gt;id&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  location  &lt;/span&gt;= azurerm_resource_group.rg.&lt;span style=&quot;color: #c77dbb;&quot;&gt;location&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  parent_id &lt;/span&gt;= azurerm_resource_group.rg.&lt;span style=&quot;color: #c77dbb;&quot;&gt;id&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;key_data&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value &lt;/span&gt;= jsondecode(azapi_resource_action.ssh_public_key_gen.&lt;span style=&quot;color: #c77dbb;&quot;&gt;output&lt;/span&gt;).publicKey&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;3. Create the main.tf file, where we will implement our actual AKS formation&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;div&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;null_resource&quot; &quot;provider_registration&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #cf8e6d;&quot;&gt;provisioner &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;local-exec&quot; &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;command &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;az provider register --namespace &#39;Microsoft.Compute&#39;&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;random_pet&quot; &quot;rg_name&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;prefix &lt;/span&gt;= var.&lt;span style=&quot;color: #c77dbb;&quot;&gt;resource_group_name_prefix&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azurerm_resource_group&quot; &quot;rg&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;location &lt;/span&gt;= var.&lt;span style=&quot;color: #c77dbb;&quot;&gt;resource_group_location&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  name     &lt;/span&gt;= random_pet.rg_name.&lt;span style=&quot;color: #c77dbb;&quot;&gt;id&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;random_pet&quot; &quot;azurerm_kubernetes_cluster_name&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;prefix &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;cluster&quot;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;random_pet&quot; &quot;azurerm_kubernetes_cluster_dns_prefix&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;prefix &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;dns&quot;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;resource &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azurerm_kubernetes_cluster&quot; &quot;k8s&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;location            &lt;/span&gt;= azurerm_resource_group.rg.&lt;span style=&quot;color: #c77dbb;&quot;&gt;location&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  name                &lt;/span&gt;= random_pet.azurerm_kubernetes_cluster_name.&lt;span style=&quot;color: #c77dbb;&quot;&gt;id&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  resource_group_name &lt;/span&gt;= azurerm_resource_group.rg.&lt;span style=&quot;color: #c77dbb;&quot;&gt;name&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  dns_prefix          &lt;/span&gt;= random_pet.azurerm_kubernetes_cluster_dns_prefix.&lt;span style=&quot;color: #c77dbb;&quot;&gt;id&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;identity &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;type &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;SystemAssigned&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;color: #cf8e6d;&quot;&gt;default_node_pool &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;name       &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;agentpool&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;vm_size    &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;Standard_A2_v2&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;node_count &lt;/span&gt;= var.&lt;span style=&quot;color: #c77dbb;&quot;&gt;node_count&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;  &lt;span style=&quot;color: #cf8e6d;&quot;&gt;linux_profile &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;admin_username &lt;/span&gt;= var.&lt;span style=&quot;color: #c77dbb;&quot;&gt;username&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;ssh_key &lt;/span&gt;{&lt;br /&gt;      &lt;span style=&quot;color: #c77dbb;&quot;&gt;key_data &lt;/span&gt;= jsondecode(azapi_resource_action.ssh_public_key_gen.&lt;span style=&quot;color: #c77dbb;&quot;&gt;output&lt;/span&gt;).publicKey&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  &lt;span style=&quot;color: #cf8e6d;&quot;&gt;network_profile &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;color: #c77dbb;&quot;&gt;network_plugin    &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;kubenet&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;load_balancer_sku &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;standard&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;4. Now we have to create our variables file called variables.tf in order to customise the deployment:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;variable &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;resource_group_location&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type        &lt;/span&gt;= string&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;default     &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;westeurope&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;description &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;Location of the resource group.&quot;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;variable &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;resource_group_name_prefix&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type        &lt;/span&gt;= string&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;default     &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;rg&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;description &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;Resource group name prefix.&quot;&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;variable &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;node_count&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type        &lt;/span&gt;= number&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;description &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;The initial quantity of nodes for the node pool.&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;default     &lt;/span&gt;= &lt;span style=&quot;color: #2aacb8;&quot;&gt;2&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;variable &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;msi_id&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type        &lt;/span&gt;= string&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;description &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;The Managed Service Identity ID.&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;default     &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;null&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;variable &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;username&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;type        &lt;/span&gt;= string&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;description &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;New cluster admin username.&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;default     &lt;/span&gt;= &lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;azureadmin&quot;&lt;br /&gt;&lt;/span&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;5. Lastly we need to create the outputs.tf for in order to get out the reference to deployment resources:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;resource_group_name&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value &lt;/span&gt;= azurerm_resource_group.rg.&lt;span style=&quot;color: #c77dbb;&quot;&gt;name&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;kubernetes_cluster_name&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;name&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;client_certificate&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config&lt;/span&gt;[&lt;span style=&quot;color: #2aacb8;&quot;&gt;0&lt;/span&gt;].&lt;span style=&quot;color: #c77dbb;&quot;&gt;client_certificate&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;client_key&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config&lt;/span&gt;[&lt;span style=&quot;color: #2aacb8;&quot;&gt;0&lt;/span&gt;].&lt;span style=&quot;color: #c77dbb;&quot;&gt;client_key&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;cluster_ca_certificate&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config&lt;/span&gt;[&lt;span style=&quot;color: #2aacb8;&quot;&gt;0&lt;/span&gt;].&lt;span style=&quot;color: #c77dbb;&quot;&gt;cluster_ca_certificate&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;cluster_password&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config&lt;/span&gt;[&lt;span style=&quot;color: #2aacb8;&quot;&gt;0&lt;/span&gt;].&lt;span style=&quot;color: #c77dbb;&quot;&gt;password&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;cluster_username&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config&lt;/span&gt;[&lt;span style=&quot;color: #2aacb8;&quot;&gt;0&lt;/span&gt;].&lt;span style=&quot;color: #c77dbb;&quot;&gt;username&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;host&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config&lt;/span&gt;[&lt;span style=&quot;color: #2aacb8;&quot;&gt;0&lt;/span&gt;].&lt;span style=&quot;color: #c77dbb;&quot;&gt;host&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #cf8e6d;&quot;&gt;output &lt;/span&gt;&lt;span style=&quot;color: #6aab73;&quot;&gt;&quot;kube_config&quot; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;color: #c77dbb;&quot;&gt;value     &lt;/span&gt;= azurerm_kubernetes_cluster.k8s.&lt;span style=&quot;color: #c77dbb;&quot;&gt;kube_config_raw&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #c77dbb;&quot;&gt;  sensitive &lt;/span&gt;= &lt;span style=&quot;color: #cf8e6d;&quot;&gt;true&lt;br /&gt;&lt;/span&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Create Azure resources&lt;/h3&gt;&lt;div&gt;Now is time to initialise terraform deployment with following command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;terraform init -upgrade&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The required provider plugins are updated to the most recent version that conforms with the version restrictions of the configuration using the &quot;-upgrade&quot; argument.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After this step we need to create an execution plan:&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;terraform plan -out main.tfplan&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we have to apply our plan:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div style=&quot;background-color: #1e1f22; color: #bcbec4;&quot;&gt;&lt;pre style=&quot;font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;terraform apply main.tfplan&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Check the results&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;Now we should check the results.&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Get the Azure resource name:&amp;nbsp;&lt;span style=&quot;background-color: #1e1f22; color: #bcbec4; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;resource_group_name=$(terraform output -raw resource_group_name)&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/li&gt;&lt;li&gt;Store K8S config in a file:&amp;nbsp;&lt;span style=&quot;background-color: #1e1f22; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #eeeeee;&quot;&gt;echo&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #1e1f22; color: #6aab73; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt; &quot;$(terraform output kube_config)&quot; &lt;/span&gt;&lt;span style=&quot;background-color: #1e1f22; color: #bcbec4; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&amp;gt; ./azurek8s&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Set env for kubectl: &lt;span style=&quot;background-color: black;&quot;&gt;&lt;span style=&quot;color: #cccccc;&quot;&gt;export KUBECONFIG=./azurek8s&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Check the health of your nodes: &lt;span style=&quot;background-color: black; color: #cccccc;&quot;&gt;kubectl get nodes&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;In Azure Portal you should find something similar with below image:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj0jXb9XQ7nPQd0kqLtH1xpgRPl3oxvhT4akpQVAmx4hc6jvDtjnX-S8LIgCntXspF5oZig8B2OL-rddSJUWbpF271aOfKBW8FRiqXNUnF73l91JfE5IHVbza7WjONkyTeaEUW_eYZosEV5oOuvoi_CS9KaRyxzR76UPmE-tl86sQw1OPVDL9lgFHHjz-Q/s2860/Screenshot%202024-02-12%20at%2016.35.30.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;626&quot; data-original-width=&quot;2860&quot; height=&quot;108&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj0jXb9XQ7nPQd0kqLtH1xpgRPl3oxvhT4akpQVAmx4hc6jvDtjnX-S8LIgCntXspF5oZig8B2OL-rddSJUWbpF271aOfKBW8FRiqXNUnF73l91JfE5IHVbza7WjONkyTeaEUW_eYZosEV5oOuvoi_CS9KaRyxzR76UPmE-tl86sQw1OPVDL9lgFHHjz-Q/w494-h108/Screenshot%202024-02-12%20at%2016.35.30.png&quot; width=&quot;494&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Deep dive into created resources&lt;/h3&gt;&lt;div&gt;Now lets deep dive to better understand created resources.&lt;/div&gt;&lt;div&gt;As you can see we have 3 resource groups.&lt;/div&gt;&lt;div&gt;We will have an in depth look to MC_rg..., which contains mainly security resources:&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Virtual Network resource: provides the fundamental building block for K8S private network in Azure&lt;/li&gt;&lt;li&gt;Network Security Group: is providing the security rules for virtual network, like closing certain ports, allowing incoming requests only from Azure Load Balancer, etc.&lt;/li&gt;&lt;li&gt;Route Table resource: is responsible for routing the traffic inside Virtual Network&lt;/li&gt;&lt;li&gt;Virtual machine scale set: is used for nodes scalability&lt;/li&gt;&lt;li&gt;Load Balancer&lt;/li&gt;&lt;li&gt;Public IP Address: your load balancer public address&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;The other 2 resource groups are containing the Kubernetes Service, SSH Key resource and Network Watcher.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Obs.: In this example the terraform state it is stored locally and for a production deployment you should store it in Azure Storage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/2008103469455917902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2024/02/public-cloud-kubernetes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/2008103469455917902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/2008103469455917902'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2024/02/public-cloud-kubernetes.html' title='Public Cloud Kubernetes'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj0jXb9XQ7nPQd0kqLtH1xpgRPl3oxvhT4akpQVAmx4hc6jvDtjnX-S8LIgCntXspF5oZig8B2OL-rddSJUWbpF271aOfKBW8FRiqXNUnF73l91JfE5IHVbza7WjONkyTeaEUW_eYZosEV5oOuvoi_CS9KaRyxzR76UPmE-tl86sQw1OPVDL9lgFHHjz-Q/s72-w494-h108-c/Screenshot%202024-02-12%20at%2016.35.30.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-2031013303024372565</id><published>2016-05-27T11:37:00.004+02:00</published><updated>2016-05-27T11:45:31.030+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CD"/><category scheme="http://www.blogger.com/atom/ns#" term="CI"/><category scheme="http://www.blogger.com/atom/ns#" term="continuous delivery"/><category scheme="http://www.blogger.com/atom/ns#" term="continuous integration"/><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="gitlab"/><category scheme="http://www.blogger.com/atom/ns#" term="Jenkins"/><category scheme="http://www.blogger.com/atom/ns#" term="Kanban"/><category scheme="http://www.blogger.com/atom/ns#" term="Project Management"/><category scheme="http://www.blogger.com/atom/ns#" term="SCRUM"/><title type='text'>Development infrastructure for Startups</title><content type='html'>You are small business in software industry and you have trouble to quickly setup a reliable and easy to use development infrastructure?&lt;br /&gt;
Luckily in our days this is not anymore trivial because a huge range of free tools are available in order to facilitate this process.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
What we need&lt;/h2&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Version control system for your code&lt;/li&gt;
&lt;li&gt;Continuous integration and continuous delivery system&lt;/li&gt;
&lt;li&gt;Binary repository for your releases&lt;/li&gt;
&lt;li&gt;Issue tracking tool&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
What are the options&lt;/h2&gt;
&lt;h3&gt;
Version control system&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
SAAS options:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bitbucket.org/&quot; target=&quot;_blank&quot;&gt;Bitbucket&lt;/a&gt;: free for teams up to 5 members&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gitlab.com/&quot; target=&quot;_blank&quot;&gt;Gitlab&lt;/a&gt;: free, you have possibility to create groups&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;Github&lt;/a&gt;: free only for public repositories&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Self hosted options:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://about.gitlab.com/features/#community&quot; target=&quot;_blank&quot;&gt;Gitlab&lt;/a&gt;: community edition is free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.atlassian.com/software/bitbucket/pricing?tab=host-on-your-server&quot; target=&quot;_blank&quot;&gt;Bitbucket&lt;/a&gt;: pay per user&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.gerritcodereview.com/&quot; target=&quot;_blank&quot;&gt;Gerrit&lt;/a&gt;: free, opensource&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
CI/CD&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
SAAS options:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://about.gitlab.com/gitlab-ci/&quot; target=&quot;_blank&quot;&gt;GitLab CI&lt;/a&gt;: you must use gitlab, is free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://enterprise.travis-ci.com/&quot; target=&quot;_blank&quot;&gt;Travis CI&lt;/a&gt;: you must use github and is pricey&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Are also other options, you can check them &lt;a href=&quot;http://www.yegor256.com/2014/10/05/ten-hosted-continuous-integration-services.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. I listed only this 2, because are the most well known.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Self hosted options:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://about.gitlab.com/gitlab-ci/&quot; target=&quot;_blank&quot;&gt;GitLab CI&lt;/a&gt;: you must use gitlab, is free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://jenkins.io/&quot; target=&quot;_blank&quot;&gt;Jenkins CI&lt;/a&gt;: free, opensource&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.atlassian.com/software/bamboo/pricing?tab=host-on-your-server&quot; target=&quot;_blank&quot;&gt;Bamboo&lt;/a&gt;: pay per user&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.go.cd/&quot; target=&quot;_blank&quot;&gt;GoCD&lt;/a&gt;: free, opensource&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Binary repository&lt;/h3&gt;
&lt;div&gt;
Here I&#39;ll present mainly the options for java world, for the others I don&#39;t really have much experience.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SAAS options:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://bintray.com/account/pricing?tab=account&amp;amp;type=pricing&quot; target=&quot;_blank&quot;&gt;Jcenter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.jfrog.com/pricing/&quot; target=&quot;_blank&quot;&gt;Artifactory&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Self hosted:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.jfrog.com/open-source/&quot; target=&quot;_blank&quot;&gt;Artifactory&lt;/a&gt;: free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sonatype.com/download-oss-sonatype&quot; target=&quot;_blank&quot;&gt;Nexus&lt;/a&gt;: &amp;nbsp;free but with more features than the artifactory free version&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Issue tracking&lt;/h3&gt;
&lt;div&gt;
SAAS options:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://trello.com/&quot; target=&quot;_blank&quot;&gt;Trello&lt;/a&gt;: free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.vivifyscrum.com/pricing&quot; target=&quot;_blank&quot;&gt;Vivify SCRUM&lt;/a&gt;: free&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kanbanflow.com/pricing&quot; target=&quot;_blank&quot;&gt;KanbanFlow&lt;/a&gt;: free&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
More options can be found &lt;a href=&quot;http://www.scrumexpert.com/tools/free-online-scrum-tools/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Self hosted options:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://kanban.leanlabs.io/&quot; target=&quot;_blank&quot;&gt;Kanban board for GitLab issues&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
A complete list could be found &lt;a href=&quot;http://alternativeto.net/software/trello/?license=free&amp;amp;platform=self-hosted&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
My option&lt;/h2&gt;
&lt;div&gt;
My option is for self hosted option using a combination of: GitLab, GitLab CI, Kanban board for GitLab and Nexus.&lt;br /&gt;
For this you will need at least one server: local or a hosted solution (E.g.: &lt;a href=&quot;https://www.hetzner.de/&quot;&gt;https://www.hetzner.de&lt;/a&gt;)&lt;br /&gt;
If you need more processing power I recommend to run GitLab CI on in is own machine and all the other on a single machine and in this case you will use 2 servers, for a small business is more than enough.&lt;br /&gt;
In order to achieve that you have to follow the next steps:&lt;br /&gt;
&lt;h4&gt;
Install gitlab-ce&amp;nbsp;&lt;/h4&gt;
Prerequisites: you have docker installed.&lt;br /&gt;
Run the next script:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
docker run --detach \
    --hostname test.gitlab.com \
    --publish 443:443 --publish 80:80 --publish 22:22 \
    --name gitlab \
    --restart always \
    --volume /etc/gitlab/config:/etc/gitlab \
    --volume /etc/gitlab/log:/var/log/gitlab \
    --volume /etc/gitlab/data:/var/opt/gitlab \
    gitlab/gitlab-ce:latest
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
Go on http://test.gitlab.com and add your password and login in the system with root user.&lt;br /&gt;
&lt;h4&gt;
Configure gitlab runner for your project&amp;nbsp;&lt;/h4&gt;
Go to Admin Area -&amp;gt; Runner page.&lt;br /&gt;
Copy the registration token and paste it in the config.toml file used for configuring the runner:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;concurrent = 1

[[runners]]
  name = &quot;docker-ruby-2.1&quot;
  url = &quot;http://test.gitlab.com/ci&quot;
  token = &quot;d100dc15945f2b730ac0776d21124c&quot;
  executor = &quot;docker&quot;
  [runners.docker]
    tls_verify = false
    image = &quot;ruby:2.1&quot;
    privileged = false
    disable_cache = false
    volumes = [&quot;/cache&quot;]
  [runners.cache]
    Insecure = false
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
Copy config.toml to /etc/gitlab/runner.&lt;br /&gt;
Now you can start your runner:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
docker run -d --name gitlab-runner --restart always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /etc/gitlab/runner:/etc/gitlab-runner \
  gitlab/gitlab-runner:latest
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
Now you can create your first project.&lt;br /&gt;
Add some code to your project and also add a file called .gitlab-ci.yml where you specify the desired build pipelines.&lt;br /&gt;
The below .gitlab-ci.yml example build a gradle project and is having 2 stages:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
image: java:8

build:
  script: &quot;./gradlew build jacocoTestReport&quot;
integration:
  script: &quot;./gradlew integrationTest&quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
Now you can push your code to gitlab and your pipelines will be executed automatically.&lt;br /&gt;
Below you can see how your pipelines will look:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfRbpMz-z_kkZf-faTE_7jSIA6m8roXue8-hKQcmdMAV3WaB3opPDcOCGub1ZoQR5s_8eUnx8PWS8tme4alt3hunUsOYHM9i92EYROq64AF-Rrdb8jL5EhPBk3hcVIi8LKuh6rAilP1On/s1600/pipelines.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfRbpMz-z_kkZf-faTE_7jSIA6m8roXue8-hKQcmdMAV3WaB3opPDcOCGub1ZoQR5s_8eUnx8PWS8tme4alt3hunUsOYHM9i92EYROq64AF-Rrdb8jL5EhPBk3hcVIi8LKuh6rAilP1On/s320/pipelines.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Install Kanban Board&lt;/h4&gt;
First install redis for kanban:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
docker run -d -p 6379:6379 --name kanban_redis leanlabs/redis
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
First you have to setup OAuth vi gitlab.&lt;br /&gt;
Go to your gitlab home page -&amp;gt; Profile Settings -&amp;gt; Applications and add the settings similar with the ones from below picture:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsPt6V4wuQdQ0IcyBIkfxH2vmcYSDh-mUMWaI8eDF7OLPT62gEOn0JpCLCiZ9V0qEmm5PAm7vtjB9K97pE8iAVq1cIpHu-6XTE9yteAVMNTAHzES_dnXUsuspnGDK9_VbW5rqgqm1L5X7K/s1600/kanban2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsPt6V4wuQdQ0IcyBIkfxH2vmcYSDh-mUMWaI8eDF7OLPT62gEOn0JpCLCiZ9V0qEmm5PAm7vtjB9K97pE8iAVq1cIpHu-6XTE9yteAVMNTAHzES_dnXUsuspnGDK9_VbW5rqgqm1L5X7K/s320/kanban2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Next install kanban:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
docker run -d \
    --link kanban_redis:kanban_redis \
    --name kanban \
    -p 8081:80 \
    -e KANBAN_SERVER_HOSTNAME=&quot;http://test.kanban.com:8081&quot; \
    -e KANBAN_GITLAB_URL=&quot;http://test.gitlab.com&quot; \
    -e KANBAN_GITLAB_CLIENT=&quot;Application ID&quot; \
    -e KANBAN_GITLAB_SECRET=&quot;Secret&quot; \
    -e KANBAN_REDIS_ADDR=&quot;kanban_redis:6379&quot; \
    leanlabs/kanban
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
Now you can access your kanban app on http://test.kanban.com:8081 and select the login wiht gitlab.&lt;br /&gt;
After that you can select one of your project form gitlab and create a kanban board for it.&lt;br /&gt;
The issues can be created from kanban app or from gitlab and they will be visible in both applications.&lt;br /&gt;
Below you can find a picture with the demo kanban board:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGCwlIQGYAE2Um5dnaZJio67Afh0s0GzQMdIiCYELXBx5YDRnlZgcnWnl_iuVtY1OlxkuLNUhM9o0J9oqojfajAIkkyUd1doXF1cpnfk0Mlsa9NUTtMBIj62bVRGmFtLhoed9LzX_BqF8p/s1600/board.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGCwlIQGYAE2Um5dnaZJio67Afh0s0GzQMdIiCYELXBx5YDRnlZgcnWnl_iuVtY1OlxkuLNUhM9o0J9oqojfajAIkkyUd1doXF1cpnfk0Mlsa9NUTtMBIj62bVRGmFtLhoed9LzX_BqF8p/s320/board.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now you can install nexus with following command:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
docker run -d -p 8081:8081 --name nexus -v /some/dir/nexus-data:/sonatype-work sonatype/nexus
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
And you have a complete development infrastructure, which of course is not perfect yet, you still to secure your apps, setup a nginx for using https.&lt;br /&gt;
&lt;br /&gt;
For any questions or issues with following this setup, please leave a comment.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/2031013303024372565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2016/05/development-infrastructure-for-startups.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/2031013303024372565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/2031013303024372565'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2016/05/development-infrastructure-for-startups.html' title='Development infrastructure for Startups'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfRbpMz-z_kkZf-faTE_7jSIA6m8roXue8-hKQcmdMAV3WaB3opPDcOCGub1ZoQR5s_8eUnx8PWS8tme4alt3hunUsOYHM9i92EYROq64AF-Rrdb8jL5EhPBk3hcVIi8LKuh6rAilP1On/s72-c/pipelines.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-4649263886713648532</id><published>2016-04-19T02:52:00.002+02:00</published><updated>2016-04-19T10:04:25.323+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cache"/><category scheme="http://www.blogger.com/atom/ns#" term="Hazelcast"/><category scheme="http://www.blogger.com/atom/ns#" term="JPA"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring-boot"/><title type='text'>Hazelcast Cache and Spring Boot</title><content type='html'>In modern software development usage of a cache mechanism is becoming a must, specially in distributed architecture like Microservices.&lt;br /&gt;
In Java world you have some good solutions for that, but I will explain in this article how to use &lt;a href=&quot;http://hazelcast.org/&quot; target=&quot;_blank&quot;&gt;Hazelcast&lt;/a&gt; with &lt;a href=&quot;http://projects.spring.io/spring-boot/&quot; target=&quot;_blank&quot;&gt;Spring boot&lt;/a&gt;, because is distributed, fast, easy to cluster and easy to test it.&lt;br /&gt;
&lt;h3&gt;
Basic config&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
In application.properties add:&lt;/div&gt;
&lt;div&gt;
-&amp;nbsp;&lt;span style=&quot;color: navy; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;spring.cache.jcache.config&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: green; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;hazelcast.xml&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In resources folder create a hazelcast.xml file only with the root tag:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;span style=&quot;background-color: #efefef; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: navy; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;hazelcast &lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: #660e7a; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;xsi&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: blue; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;:schemaLocation=&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: green; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;&quot;http://www.hazelcast.com/schema/config hazelcast-config-3.6.xsd&quot;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;background-color: #efefef; color: green; font-weight: bold;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: blue; font-weight: bold;&quot;&gt;xmlns=&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: green; font-weight: bold;&quot;&gt;&quot;http://www.hazelcast.com/schema/config&quot;&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: green; font-weight: bold;&quot;&gt;           &lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: blue; font-weight: bold;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: #660e7a; font-weight: bold;&quot;&gt;xsi&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: blue; font-weight: bold;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: green; font-weight: bold;&quot;&gt;&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;span style=&quot;background-color: #efefef;&quot;&gt;&lt;b&gt;&amp;lt;/&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #efefef; color: navy; font-weight: bold;&quot;&gt;hazelcast&amp;gt;&lt;/span&gt;&lt;/pre&gt;
In your gradle or maven file add compile dependencies to lates version of hazelcast and hazelcast client.
&lt;br /&gt;
&lt;h3&gt;
Basic usage&lt;/h3&gt;
The main annotations are: Cacheable, CacheEvict and CachePut.&lt;br /&gt;
Cacheable and CachePut are similar with the mention that one is caching the reads and the second one is add the value to cache when a write is performed.&lt;br /&gt;
CacheEvict is used to invalidate the Cache.&lt;br /&gt;
&lt;br /&gt;
Usage example:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: olive; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;@Cacheable&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;(value = &lt;/span&gt;&lt;span style=&quot;color: green; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;&quot;findOne&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;, key = &lt;/span&gt;&lt;span style=&quot;color: green; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt; font-weight: bold;&quot;&gt;&quot;#p0&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;menlo&amp;quot;; font-size: 9pt;&quot;&gt;User findOne(Long id)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: olive;&quot;&gt;@CacheEvict&lt;/span&gt;(value = &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;findOne&quot;&lt;/span&gt;, key = &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;#p0.id&quot;&lt;/span&gt;)
User save(User user);&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;pre style=&quot;font-family: Menlo; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: olive;&quot;&gt;@CachePut&lt;/span&gt;(value = &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;findOne&quot;&lt;/span&gt;, key = &lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;&quot;#p0.id&quot;&lt;/span&gt;)
User save(User user);&lt;/pre&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
In all the above cases p0 represent the value of first input argument. When you have a single argument you can use also iban instead.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Configuring for production&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
With the above configuration is fine for development machine or for integration testing, but in production you would like to have the cache cluster install on a different cluster which scales independent by you application.&lt;br /&gt;
For this you need to create a configuration file for profile &lt;i&gt;production&lt;/i&gt; where you create a HazelcastInstance bean:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
@Profile(&quot;production&quot;)
@Configuration
public class CacheConfig {

    @Bean
    public HazelcastInstance hazelcastInstance() {
        ClientConfig clientConfig = new ClientConfig();
        ClientNetworkConfig clientNetworkConfig = new ClientNetworkConfig();
        clientNetworkConfig.addAddress(&quot;127.0.0.1:5701&quot;);
        clientConfig.setNetworkConfig(clientNetworkConfig);
        HazelcastInstance client = HazelcastClient.newHazelcastClient(clientConfig);
        return client;
    }

}
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
For testing this profile you just have to download hazelcast distribution and from demo folder run console.sh or console.bat and when are you starting you application to add production profile to spring.profiles.active.&lt;br /&gt;
&lt;br /&gt;
More about hazelcast you can find out on their home page &lt;a href=&quot;http://hazelcast.org/&quot;&gt;http://hazelcast.org&lt;/a&gt;&amp;nbsp;and about spring cache from official spring documentation&amp;nbsp;&lt;a href=&quot;http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html&quot;&gt;http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/4649263886713648532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2016/04/hazelcast-cache-and-spring-boot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4649263886713648532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4649263886713648532'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2016/04/hazelcast-cache-and-spring-boot.html' title='Hazelcast Cache and Spring Boot'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-3788117294673382029</id><published>2016-04-13T12:58:00.002+02:00</published><updated>2021-02-17T14:00:39.539+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ansible"/><category scheme="http://www.blogger.com/atom/ns#" term="Gatling"/><category scheme="http://www.blogger.com/atom/ns#" term="Gradle"/><category scheme="http://www.blogger.com/atom/ns#" term="Grafana"/><category scheme="http://www.blogger.com/atom/ns#" term="InfluxDB"/><category scheme="http://www.blogger.com/atom/ns#" term="Load Test"/><category scheme="http://www.blogger.com/atom/ns#" term="Performance Test"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="Scala"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring-boot"/><title type='text'>Gatling, shoot your app</title><content type='html'>If you think that &lt;a href=&quot;http://jmeter.apache.org/&quot;&gt;JMeter&lt;/a&gt; is not cool and &lt;a href=&quot;http://grinder.sourceforge.net/&quot;&gt;Grinder&lt;/a&gt; is not maintained since 2012, fortunately you have an alternative: &lt;a href=&quot;http://gatling.io/&quot;&gt;Gatling&lt;/a&gt;.&lt;br /&gt;
Are also other alternatives (I&#39;ll write about them in other posts), but in this post I&#39;ll make a short introduction into gatling.&lt;br /&gt;
&lt;h2&gt;
Create a gradle project&lt;/h2&gt;
&lt;div&gt;
Create a gradle project using &lt;a href=&quot;https://gatling.io/docs/current/extensions/gradle_plugin/&quot;&gt;gradle-gatling-plugin&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
Why gradle and not maven?&lt;/div&gt;
&lt;div&gt;
Because the single requirement of gradle is the JVM, not even gradle is required to be install on your computer or server.&lt;/div&gt;
&lt;div&gt;
Your build.gradle should be very simple and small:&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;andale mono&amp;quot;, &amp;quot;lucida console&amp;quot;, monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
plugins {
    id &#39;io.gatling.gradle&#39; version &quot;3.5.1&quot;
}


gatling {
    jvmArgs = [&#39;-server&#39;, &#39;-Xms512M&#39;, &#39;-Xmx512M&#39;]
    systemProperties = [&#39;file.encoding&#39;: &#39;UTF-8&#39;]
}&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
Of course apart from that your should create also the scripts gradlew for linux and gradlew.bat for windows, but this are usually generated by the IDE (IDEA is pretty good in doing that).&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Create the folder structure&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;src/gatling/scala: here you need put your simulation sources&lt;/li&gt;&lt;li&gt;src/gatling/resources: here you have to place your custom gatling configurations&lt;/li&gt;
&lt;li&gt;src/gatling/resources/data: here you have to place you feeder data in case you are using csv feeder&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h2&gt;
Implement your simulations&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
In src/gatling scala you have to implement your simulations.&lt;/div&gt;
&lt;div&gt;
The gatling api is clear and pretty easy to use, you don&#39;t need to be a scala expert.&lt;/div&gt;
&lt;div&gt;
The below code snippet is a simulation example which get a user by email and then update the user:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;andale mono&amp;quot;, &amp;quot;lucida console&amp;quot;, monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
class UserServiceSimpleSimulation extends Simulation {

  val feeder = csv(&quot;data/users.csv&quot;).random

  val httpConf = http.baseURL(&quot;http://localhost:50001&quot;)
    .header(&quot;Content-Type&quot;, &quot;application/json&quot;)

  val chainScenario = scenario(&quot;Chain&quot;) // A scenario with a chain of requests and pauses
    .feed(feeder)
    .exec(http(&quot;Get user by email&quot;)
      .get(&quot;/users/search/findByEmail?email=${email}&quot;)
      .check(status.is(200))
      .check(jsonPath(&quot;$&quot;).ofType[Map[String, Any]].find.saveAs(&quot;userDataMap&quot;))
      .check(
        jsonPath(&quot;$.._links.self.href&quot;).find.exists.saveAs(&quot;nextUrl&quot;))
    ).exec(http(&quot;Update password&quot;).put(&quot;${nextUrl}&quot;)
    .body(StringBody(&quot;&quot;&quot;{&quot;firstName&quot;: &quot;${userDataMap.firstName}&quot;,
              &quot;lastName&quot;: &quot;${userDataMap.lastName}&quot;,
              &quot;email&quot;: &quot;${userDataMap.email}&quot;,
              &quot;password&quot;: &quot;newpassword2&quot;}&quot;&quot;&quot;))
    .asJSON.check(status.is(200)))

  setUp(
    chainScenario.inject(constantUsersPerSec(10).during(600 seconds)).protocols(httpConf)
  ).assertions(global.responseTime.max.lessThan(5000))

}
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;h2&gt;
Integration with Influxdb&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
You need to have an Influxdb server running with graphite support enabled and also a charting component, for example Grafana, in order to visualize the results in real time.&lt;/div&gt;
&lt;div&gt;
Then you need to create a file called gatling.conf in src/gatling/resources/conf with the following content:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: &amp;quot;andale mono&amp;quot;, &amp;quot;lucida console&amp;quot;, monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;
gatling {
  data {
    writers = &quot;console, file, graphite&quot;
    reader = file

    graphite {
      host = &quot;&lt;influxdb host=&quot;&quot;&gt;&quot;
      port = &lt;influx db=&quot;&quot; port=&quot;&quot;&gt;
      protocol = &quot;tcp&quot; # Protocol: &quot;tcp&quot; or &quot;udp&quot;)
      rootPathPrefix = &quot;gatling&quot; # prefix of all metrics sent to Influxdb
    }
  }
}
&lt;/influx&gt;&lt;/influxdb&gt;&lt;/code&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h2&gt;
Execute simulations&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
./gradlew gatlingRun-&amp;lt;FQN of simulation class&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
the results can be grabbed from folder build/reports/gatling&lt;/div&gt;
&lt;div&gt;
If you would like to execute all simulations execute the next command:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
./gradlew gatlingRun&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Extras: Local Grafana and InfluxDB&lt;/h2&gt;
&lt;div&gt;
Prerequisite: you need to have docker installed.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Start InfluxDB with graphite support:&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: x-small;&quot;&gt;docker run -d --name=influxdb -p 8083:8083 -p 8086:8086 -p 2015:2015 -e GRAPHITE_DB=&quot;gatling&quot; -e GRAPHITE_BINDING=&#39;:2015&#39; -e GRAPHITE_PROTOCOL=&quot;tcp&quot; tutum/influxdb&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;color: #222222; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Start Grafana:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;color: #222222; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: x-small;&quot;&gt;docker run -d --name=grafana -p 3000:3000 grafana/grafana&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span face=&quot;&amp;quot;arial&amp;quot; , sans-serif&quot; style=&quot;background-color: white; color: #222222; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Now you just have to log in to grafana console and configure your charts. The default username/password is admin/admin&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Conclusion&lt;/h2&gt;
&lt;div&gt;
As you can see, using this approach is becoming very easy to automate the deployment and the test execution with a tool like Ansible, Chef or Puppet.&lt;/div&gt;
&lt;div&gt;
Even if gatling is not distributed out of the box, you can deploy it on multiple servers and start the tests using the above approach and send the data to InfluxDB and then you will have your metrics aggregated.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Bonus&lt;/h2&gt;
&lt;div&gt;
Here you can find a demo project:&amp;nbsp;&lt;a href=&quot;https://github.com/atdi/gatling-tutorial&quot;&gt;https://github.com/atdi/gatling-tutorial&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
This project contains a gradle multi-project with 2 modules:&lt;/div&gt;
&lt;div&gt;
- A small rest server&lt;/div&gt;
&lt;div&gt;
- Gatling module with 2 simulations&lt;/div&gt;
&lt;div&gt;
You need to have installed on your computer only JDK8.&lt;/div&gt;
&lt;div&gt;
In the Readme it is specified how to run it.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/3788117294673382029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2016/04/gatling-shoot-your-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/3788117294673382029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/3788117294673382029'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2016/04/gatling-shoot-your-app.html' title='Gatling, shoot your app'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-9114566653902906237</id><published>2016-03-30T17:16:00.001+02:00</published><updated>2016-03-30T17:26:44.915+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ESB"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaEE"/><category scheme="http://www.blogger.com/atom/ns#" term="JEE"/><category scheme="http://www.blogger.com/atom/ns#" term="Jersey"/><category scheme="http://www.blogger.com/atom/ns#" term="JPA"/><category scheme="http://www.blogger.com/atom/ns#" term="REST"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring-boot"/><title type='text'>JEE, Spring or both</title><content type='html'>&lt;style type=&quot;text/css&quot;&gt;
 table.tableizer-table {
  font-size: 12px;
  border: 1px solid #CCC; 
  font-family: Arial, Helvetica, sans-serif;
 } 
 .tableizer-table td {
  padding: 4px;
  margin: 3px;
  border: 1px solid #CCC;
 }
 .tableizer-table th {
  background-color: #104E8B; 
  color: #FFF;
  font-weight: bold;
 }
&lt;/style&gt;

&lt;br /&gt;
&lt;h2&gt;
Motivation&lt;/h2&gt;
&lt;div&gt;
Since 2012 I&#39;ve notice an ongoing debate about which is better: JEE stack or Spring stack.&lt;/div&gt;
&lt;div&gt;
Personally I prefer the third option Spring + JEE.&lt;/div&gt;
&lt;div&gt;
Below I&#39;ll explain the wrong assumptions that has been made about both stacks and what are advantages and disadvantages of both from my perspective.&lt;br /&gt;
Until 2010 I was working mainly using J2EE and JEE with AS like Jboss, Weblogic, GlassFish and also I was using in one project Seam 2 (bad decision from my side in the end) and after I started to use more light way approaches, like Guice+Embedded Jetty, Spring and also Django and Flask from python world.&lt;/div&gt;
&lt;div&gt;
&lt;h2&gt;
Spring vs JEE side by side&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;table class=&quot;tableizer-table&quot;&gt;
&lt;thead&gt;
&lt;tr class=&quot;tableizer-firstrow&quot;&gt;&lt;th&gt;Feature&lt;/th&gt;&lt;th&gt;Spring&lt;/th&gt;&lt;th&gt;JEE&lt;/th&gt;&lt;th&gt;Comments&lt;/th&gt;&lt;th&gt;My Choice&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;DI&lt;/td&gt;&lt;td&gt;Spring DI&lt;/td&gt;&lt;td&gt;CDI&lt;/td&gt;&lt;td&gt;Spring can be integrated with CDI using a DI bridge. &lt;/td&gt;&lt;td&gt;Spring, even is supporting also annotations from JSR-330, the spring annotations like Service, Repository, Component etc. are better, because they follow DDD approach&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AOP&lt;/td&gt;&lt;td&gt;Spring AOP&lt;/td&gt;&lt;td&gt;Interceptor&lt;/td&gt;&lt;td&gt;If you are going with JEE and EJB3 then you have to use Interceptors&lt;/td&gt;&lt;td&gt;Spring, because here I depend on the previous choice.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Persistence&lt;/td&gt;&lt;td&gt;JPA, JDBC, NoSQL etc.&lt;/td&gt;&lt;td&gt;JPA, JDBC&lt;/td&gt;&lt;td&gt;Spring through spring-data is offering more persistence solutions from RDBMS to NoSql databases or Full-Text search engines&lt;/td&gt;&lt;td&gt;Spring-Data for RDBMS and for other I&#39;ll just use the plain implementations offered by the vendor&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Transactions&lt;/td&gt;&lt;td&gt;JTA&lt;/td&gt;&lt;td&gt;JTA&lt;/td&gt;&lt;td&gt;Spring is offering more isolation levels&lt;/td&gt;&lt;td&gt;Spring&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;REST&lt;/td&gt;&lt;td&gt;Spring MVC Rest&lt;/td&gt;&lt;td&gt;JAX-RS&lt;/td&gt;&lt;td&gt;JAX-RS standard is superior in my view to Spring Rest, and also Jersey 2 can be easily integrated with Spring DI&lt;/td&gt;&lt;td&gt;JAX-RS (Jersey 2)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Security&lt;/td&gt;&lt;td&gt;Spring Security, Spring Oauth&lt;/td&gt;&lt;td&gt;JavaEE security&lt;/td&gt;&lt;td&gt;No comments&lt;/td&gt;&lt;td&gt;I&#39;ll choose only spring-oauth in case that I want to implement an Oauth provider, for the application itself I&#39;ll rely on http context and filters (E.g: for JAX-RS I&#39;ll use jersey filters and RolesAllowed annotation)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Messaging&lt;/td&gt;&lt;td&gt;JMS2, AMPQ, Kafka, AWS SQS&lt;/td&gt;&lt;td&gt;JMS2&lt;/td&gt;&lt;td&gt;Here definitely spring is the winner, because is offering a smooth integration to multiple messaging brokers via spring jms and spring stream&lt;/td&gt;&lt;td&gt;Spring&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Embedded Servers support&lt;/td&gt;&lt;td&gt;Tomcat, Jetty, Undertow&lt;/td&gt;&lt;td&gt;Only for testing or Tomcat, Jetty, Undertow using a minimalist stack: Jersye2+HK2&lt;/td&gt;&lt;td&gt;JEE stack is still stucked to AS, which they are not so heavy anymore, but still you will miss the flexibility on using embedded servers and is painful to upgrade to newer versions&lt;/td&gt;&lt;td&gt;Spring (spring-boot) or Jersey2+HK2 if a I need only a simple Rest API&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cloud Support&lt;/td&gt;&lt;td&gt;Spring cloud&lt;/td&gt;&lt;td&gt;Not really&lt;/td&gt;&lt;td&gt;Spring cloud is coming with a lot of batteries for cloud computing: E.g Service Discovery, Centralized Configurations, Client side load balancing, Circuit Breaker etc.&lt;/td&gt;&lt;td&gt;Spring&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Configuration&lt;/td&gt;&lt;td&gt;Resources (Yaml or properties files), Command line arguments, Environment Variables&lt;/td&gt;&lt;td&gt;Resources (properties, xml files)&lt;/td&gt;&lt;td&gt;Spring is favor&amp;nbsp;convention over configuration&lt;/td&gt;&lt;td&gt;Spring&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Integration Testing&lt;/td&gt;&lt;td&gt;Spring Test Framework&lt;/td&gt;&lt;td&gt;Arquillian&lt;/td&gt;&lt;td&gt;With spring you can start the same server is used in production, on the other hand with arquillian you will just simulate/mimic the production environment &lt;/td&gt;&lt;td&gt;Spring&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
Conclusions:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;As you can see, overall, Spring is my choice, but bear in mind, that spring is build &amp;nbsp;in top of some of the JEE api&#39;s: Servlet API, JPA etc., but also they have the freedom to don&#39;t wait for certain standards to be defined and to come faster with solutions that are required on the market now.&lt;/li&gt;
&lt;li&gt;Regarding to spring cloud, majority of the solutions are just wrapper in top of Netflix OSS, but easier to rump up without having deep knowledge about Netflix OSS.&lt;/li&gt;
&lt;li&gt;They are not mutually exclusive, both can coexist together and I recommend to take the advantage of both.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
JEE is not dead and won&#39;t die, spring exist because JEE exist and JEE has been improved because spring exist.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/9114566653902906237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2016/03/jee-spring-or-both.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/9114566653902906237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/9114566653902906237'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2016/03/jee-spring-or-both.html' title='JEE, Spring or both'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-4995397234446013079</id><published>2015-12-08T23:43:00.001+01:00</published><updated>2015-12-09T14:43:43.702+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AOP"/><category scheme="http://www.blogger.com/atom/ns#" term="Commands"/><category scheme="http://www.blogger.com/atom/ns#" term="Embedded"/><category scheme="http://www.blogger.com/atom/ns#" term="Hystrix"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Microservices"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring-boot"/><title type='text'>Hystrix Commands: inheritance vs annotations</title><content type='html'>&lt;h2&gt;
Introduction&lt;/h2&gt;
&lt;div&gt;
Hystrix is a library that help&#39;s you control the interaction between service in a distributed application.&lt;/div&gt;
&lt;div&gt;
You can use hystrix in 2 ways:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Use inheritance to implement the command functionality&lt;/li&gt;
&lt;li&gt;Use annotation in order to define aspects on the methods that are representing the implementation of your commands functionalities&lt;/li&gt;
&lt;/ul&gt;
Both approaches have advantages and disadvantages, but depends basically on your needs and your feelings what you&#39;l gonna choose.&lt;br /&gt;
&lt;br /&gt;
In this article I&#39;ll insist on the advantages and&amp;nbsp;disadvantages of using them together with Spring DI.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Below I&#39;ll create a simple command which is doing a post to service that should load user details based on his email address.&lt;/div&gt;
&lt;h2&gt;
Inheritance &amp;nbsp;&lt;/h2&gt;
&lt;div&gt;
I&#39;ll start with inheritance approach.&lt;/div&gt;
&lt;div&gt;
First we are implementing the command class:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;class&lt;/span&gt; GetUserByEmailCommand &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;extends&lt;/span&gt; HystrixCommand&amp;lt;User&amp;gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; userEmail&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; url&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; GetUserByEmailCommand&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; email&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; url&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;int&lt;/span&gt; timeout&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;super&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;Setter&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;withGroupKey&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;HystrixCommandGroupKey&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Factory&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;asKey&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;GroupName&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;andCommandKey&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;HystrixCommandKey&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Factory&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;asKey&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;CommandKey&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;andThreadPoolKey&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;HystrixThreadPoolKey&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Factory&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;asKey&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;ThreadPoolKey&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                &lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;andCommandPropertiesDefaults&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;HystrixCommandProperties&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Setter&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                        &lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;withExecutionTimeoutInMilliseconds&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;timeout&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;Override
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;protected&lt;/span&gt; User run&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;throws&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;Exception&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: dimgrey;&quot;&gt;// execute remote call&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; user&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;


    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;Override
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;protected&lt;/span&gt; User getFallback&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: dimgrey;&quot;&gt;// implement the fallback method&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Now we have the command class and we can use it like in the below example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;User user = new GetUserByEmailCommand(email, url, timeout).execute();
&lt;/pre&gt;
&lt;br /&gt;
This is fine, not very complicate, but we cannot inject the command using Spring DI.
For this we will need to create an additional class, that we will name it SimpleUserClient.
Below you can see how this class should like:&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;@Service
&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;class&lt;/span&gt; SimpleUserClient &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;Value&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;${cm.user.url}&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; url&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;Value&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;${cm.user.timeout}&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977;&quot;&gt;int&lt;/span&gt; timeout&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; User getUserByEmail&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; email&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; GetUserByEmailCommand&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;email&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; url&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; timeout&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;execute&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;br /&gt;
We&#39;ve implemented 2 classes to enable the injection of our command using Spring DI, but we can externalize the commands settings properties file or in environment variables.&lt;br /&gt;
&lt;h2&gt;
Annotation&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
The command implementation using is much simpler compare with the inheritance approach.&lt;/div&gt;
&lt;div&gt;
We have to implement only command class and to annotated the command method as in the below example:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #ffffff; color: black;&quot;&gt;@Component
&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;class&lt;/span&gt; UserLoginCommand &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    
    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;Value&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;${cm.user.url}&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; userServiceUrl&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;HystrixCommand&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;fallbackMethod &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;getError&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
            groupKey &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;OauthGroup&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
            commandKey &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;GetUserByEmail&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
            commandProperties &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                    &lt;span style=&quot;color: #808030;&quot;&gt;@&lt;/span&gt;HystrixProperty&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;name &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;execution.isolation.thread.timeoutInMilliseconds&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt;
                            value &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000e6;&quot;&gt;&quot;1000&quot;&lt;/span&gt;
                    &lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; User getUser&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; email&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: dimgrey;&quot;&gt;// execute remote call&lt;/span&gt;
        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;return&lt;/span&gt; user&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; User getError&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;final&lt;/span&gt; &lt;span style=&quot;color: #bb7977; font-weight: bold;&quot;&gt;String&lt;/span&gt; emai&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        &lt;span style=&quot;color: dimgrey;&quot;&gt;// implement fallback method&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
As you can see, in this case we wrote less code, but we cannot externalize the command settings like thread pool, timeout etc.
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Conclusions&lt;/h2&gt;
&lt;div&gt;
As you can see the annotation approach is easier to implement and cleaner, but the inheritance approach is offering the possibility to externalize the commands settings, and this could be more convenient, because we can change them in production without to create a new release. &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/4995397234446013079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2015/12/hystrix-commands-inheritance-vs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4995397234446013079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4995397234446013079'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2015/12/hystrix-commands-inheritance-vs.html' title='Hystrix Commands: inheritance vs annotations'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-471125537422397850</id><published>2015-11-11T14:16:00.003+01:00</published><updated>2015-11-11T14:19:20.039+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Agile"/><category scheme="http://www.blogger.com/atom/ns#" term="Kanban"/><category scheme="http://www.blogger.com/atom/ns#" term="Management"/><category scheme="http://www.blogger.com/atom/ns#" term="Planning"/><category scheme="http://www.blogger.com/atom/ns#" term="Poker"/><category scheme="http://www.blogger.com/atom/ns#" term="Project"/><category scheme="http://www.blogger.com/atom/ns#" term="SCRUM"/><title type='text'>Kanban vs SCRUM</title><content type='html'>&lt;h1 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 0px;&quot;&gt;
Introduction&lt;/h1&gt;
&lt;div style=&quot;font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;This article is complementary to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;a href=&quot;http://aurelavramescu.blogspot.de/2015/11/scrum-short-introduction.html&quot;&gt;SCRUM a short introduction&lt;/a&gt;&amp;nbsp;article, in order to highlight the difference between both methodologies, and what parts of the Kanban process can be adopted in a SCRUM process.&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Similarities&lt;/h1&gt;
&lt;ol style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li&gt;Both are Lean and Agile&lt;/li&gt;
&lt;li&gt;Both use pull scheduling&lt;/li&gt;
&lt;li&gt;Both limit WIP (wrok in progress)&lt;/li&gt;
&lt;li&gt;Both use transparency to drive process improvement&lt;/li&gt;
&lt;li&gt;Both focus on delivering releasable software early and often&lt;/li&gt;
&lt;li&gt;Both are based on self-organizing teams&lt;/li&gt;
&lt;li&gt;Both require breaking the work into pieces&lt;/li&gt;
&lt;li&gt;In both cases the release plan is continuously optimized based on empirical data (velocity / lead time)&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Obs. Because of point 8 I prefer Story Points.&lt;/div&gt;
&lt;h1 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Differences&lt;/h1&gt;
&lt;table class=&quot;confluenceTable&quot; style=&quot;border-collapse: collapse; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px; overflow-x: auto;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th class=&quot;confluenceTh&quot; style=&quot;background-color: #f0f0f0; border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;SCRUM&lt;/th&gt;&lt;th class=&quot;confluenceTh&quot; style=&quot;background-color: #f0f0f0; border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;Kanban&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Timeboxed iterations prescribed&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Timeboxed iterations optional. Can have separate cadences for planning, release, and process improvement. Can be event-driven instead of timeboxed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Team commits to a specific amount of work for this iteration&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Commitment optional&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Uses Velocity as default metric for planning and process improvement&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Uses Lead time as default metric for planning and process improvement&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Cross-functional teams prescribed&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Cross-functional teams optional. &lt;strong&gt;Specialist teams allowed.&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Items must be broken down so they can be completed within 1 sprint&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;No particular item size is prescribed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Burndown chart prescribed&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;No particular type of diagram is prescribed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;WIP limited indirectly (per sprint)&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;WIP limited directly (per workflow state)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Estimation prescribed&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Estimation optional&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Cannot add items to ongoing iteration&lt;/span&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Can add new items whenever capacity is available&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;A sprint backlog is owned by one specific team&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;A kanban board may be shared by multiple teams or individuals&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Prescribes 3 roles (PO/SM/Team)&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Doesn’t prescribe any roles&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;A Scrum board is reset between each sprint&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;A kanban board is persistent&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;strong&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Prescribes a prioritized product backlog&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td class=&quot;confluenceTd&quot; colspan=&quot;1&quot; style=&quot;border: 1px solid rgb(221, 221, 221); padding: 7px 10px; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;Prioritization is optional&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Obs.: The techniques that I think worth to be combine from both are&amp;nbsp;&lt;span class=&quot;J-JK9eJ-PJVNOc&quot;&gt;highlighted&lt;/span&gt;&lt;/div&gt;
&lt;h1 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Conclusion&lt;/h1&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
In both methodoliges the Acceptance Criteria are important.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Usually in software industry we cannot really use only one methodology for everything, and you should combine them and most used combination is&amp;nbsp;&lt;strong&gt;&lt;span class=&quot;J-JK9eJ-PJVNOc&quot;&gt;XP&lt;/span&gt;&amp;nbsp;+ SCRUM +&amp;nbsp;&lt;span class=&quot;J-JK9eJ-PJVNOc&quot;&gt;Kanban&lt;/span&gt;&lt;/strong&gt;.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/471125537422397850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2015/11/kanban-vs-scrum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/471125537422397850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/471125537422397850'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2015/11/kanban-vs-scrum.html' title='Kanban vs SCRUM'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-4917737985134051154</id><published>2015-11-11T14:11:00.004+01:00</published><updated>2015-11-11T14:19:21.558+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Agile"/><category scheme="http://www.blogger.com/atom/ns#" term="Management"/><category scheme="http://www.blogger.com/atom/ns#" term="Planning"/><category scheme="http://www.blogger.com/atom/ns#" term="Poker"/><category scheme="http://www.blogger.com/atom/ns#" term="Project"/><category scheme="http://www.blogger.com/atom/ns#" term="SCRUM"/><title type='text'>SCRUM a short introduction</title><content type='html'>&lt;h1 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Introduction&lt;/h1&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Scrum is a framework for developing and sustaining complex products. In this page we will cover my opinion about a good scrum process should look.&amp;nbsp;&lt;/div&gt;
&lt;h1 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Scrum Events&lt;/h1&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Scrum prescribes four formal events for inspection and adaptation :&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;Sprint Planning&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;Daily Scrum&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;Sprint Review&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;Sprint Retrospective&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
The Sprint&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Sprint is a time-box iteration of 3 weeks.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Sprints best have consistent durations throughout a development effort. A new Sprint&amp;nbsp;&lt;strong&gt;starts immediately after the conclusion of the previous Sprint&lt;/strong&gt;.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Sprints contain and consist of the Sprint Planning, Daily Scrums, the development work, the Sprint Review, and the Sprint Retrospective.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
During the Sprint:&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;No changes are made that would endanger the Sprint Goal&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
Quality goals do not decrease&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Scope may be clarified and re-negotiated between the Product Owner and Development Team as more is learned&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Sprint Planning&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
If the lenght of a Sprint is 4 weeks the Sprint Planning is time-boxed to maximum 6 hours.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
If the lenght of a Sprint is 3 weeks the Sprint Planning is time-boxed to maximum 5 hours.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
If the lenght of a Sprint is 2 weeks the Sprint Planning is time-boxed to maximum 4 hours.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The reccomended day of the week for this meeting is Wednesday.&lt;/div&gt;
&lt;h3 class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Input of the meeting&lt;/h3&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The input to this meeting is the Product Backlog, the latest product Increment, projected capacity of the Development Team during the Sprint, and past performance of the Development Team.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Each story from the Product Backlog must come with&amp;nbsp;&lt;strong&gt;Acceptance Criteria.&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
If the&amp;nbsp;&lt;strong&gt;Acceptance Criteria&lt;/strong&gt;&amp;nbsp;is not cleared defined the story cannot be included in the Sprint.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Product Owner discusses the objective that the Sprint should achieve and the Product Backlog items that, if completed in the Sprint, would achieve the Sprint Goal,&amp;nbsp;&lt;strong&gt;but&amp;nbsp;what it can accomplish over the upcoming Sprint&amp;nbsp;only and only the Development Team can assess&lt;/strong&gt;.&amp;nbsp;&lt;/div&gt;
&lt;h3 class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Planning Procedure&lt;/h3&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
For planning the used methodology will be&amp;nbsp;&lt;strong&gt;Planning Poker&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Prerequisites:&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li&gt;The Product Owner&amp;nbsp;&lt;strong&gt;should not show or display preliminary estimations&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Each participant to this meeting must have a set of cards&amp;nbsp;&lt;span data-mce-style=&quot;color: #000000;&quot; style=&quot;color: black;&quot;&gt;showing&amp;nbsp;&lt;strong&gt;the Fibonacci sequence including a zero&lt;/strong&gt;.&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The steps performed in order to accomplish the estimations are:&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li&gt;The Scrum Product Owner presents the story to be estimated. The Scrum Team asks questions and the Scrum Product Owner explains in more detail. If many stories have to be estimated a time-constraint (e.g. only one minute for explanation) might be set as well. If the time-constraint is reached and the Scrum Team does not understand the story it is a sign that the story has to be re-written(and offcourse cannot be estimated).&lt;/li&gt;
&lt;li&gt;Each member of the Scrum Team privately chooses the card representing the estimation (&lt;strong&gt;Obs. A single card, not 2 or 3 cards&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;After everyone has chosen a card, all selections are revealed.&lt;/li&gt;
&lt;li&gt;People with high and low estimates are allowed to explain their estimate.&lt;/li&gt;
&lt;li&gt;If the estimation are&amp;nbsp;too divergent the game is played again&lt;/li&gt;
&lt;li&gt;This game is repeated until all stories that will be part of the sprint are estimated.&lt;/li&gt;
&lt;li&gt;If a Story estimation is bigger than 13, then this must be splitted and the game should be replayed on the resulted stories after splitt.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
In the teams with no experience with Agile Methodologies, the numbers used durring Planning Poker is better to represent days.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Daily Scrum&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Daily Scrum is a 15-minute time-boxed event for the Development Team to synchronize activities and create a plan for the next 24 hours. This is done by inspecting the work since the last Daily Scrum and forecasting the work that could be done before the next one. The Daily Scrum is held at the same time and place each day to reduce complexity.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
During the meeting, the Development Team members explain:&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
What did I do yesterday that helped the Development Team meet the Sprint Goal?&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
What will I do today to help the Development Team meet the Sprint Goal?&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Do I see any impediment that prevents me or the Development Team from meeting the Sprint Goal?&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Recommended hour for Daily Scrum is 10:45 AM, but also 9:45 AM is a good time for it.&lt;/div&gt;
&lt;h2 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Sprint Review&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
A Sprint Review is held at the end of the Sprint to inspect the Increment and adapt the Product Backlog if needed. During the Sprint Review, the Scrum Team, Product Owner and stakeholders collaborate about what was done in the Sprint. Based on that and any changes to the Product Backlog during the Sprint, attendees collaborate on the next things that could be done to optimize value. This is an informal meeting, not a status meeting, and the presentation of the Increment is intended to elicit feedback and foster collaboration.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
This is a maximu two-hour time-boxed meeting. The Scrum Master ensures that the event takes place and that attendants understand its purpose. The Scrum Master teaches all to keep it within the time-box.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Sprint Review includes the following elements:&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Attendees include the Scrum Team and key stakeholders invited by the Product Owner&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;The Product Owner explains what Product Backlog items have been &quot;Done&quot; and what has not been &quot;Done&quot;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;The Development Team discusses what went well during the Sprint, what problems it ran into, and how those problems were solved&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;The Development Team presents a short demo of the work that it has &quot;Done&quot; and answers questions about the Increment&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;The Product Owner discusses the Product Backlog as it stands and projects likely completion dates based on progress to date (if needed)&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;The entire group collaborates on what to do next, so that the Sprint Review provides valuable input to subsequent Sprint Planning&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Review of the timeline and potential capabilities for the next anticipated release of the product&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The result of the Sprint Review is a revised Product Backlog that defines the probable Product Backlog items for the next Sprint. The Product Backlog may also be adjusted overall to meet new opportunities.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Recommended day for Spring Review is Wednesday, before Sprint Retrospective.&lt;/div&gt;
&lt;h2 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Sprint Retrospective&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Sprint Retrospective occurs after the Sprint Review and prior to the next Sprint Planning.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
In our case the Sprint Retrospective is one-hour time-boxed meeting.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The purpose of the Sprint Retrospective is to:&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Inspect how the last Sprint went with regards to people, relationships, process, and tools&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Identify and order the major items that went well and potential improvements&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Create a plan for implementing improvements to the way the Scrum Team does its work&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Scrum Team&lt;/h1&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Scrum Team consists of a Product Owner, the Development Team, and a Scrum Master.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The&amp;nbsp;teams&amp;nbsp;&lt;strong&gt;must be self-organizing and cross-functional&lt;/strong&gt;.&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
The Product Owner&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Product Owner is the sole person responsible for managing the Product Backlog.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Product Backlog management includes:&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;Clearly expressing Product Backlog items&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;Ordering the items in the Product Backlog based on priority and time when they must be delivered&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;Ensuring that the Product Backlog is visible, transparent, and clear to all, and shows what the Scrum Team will work on next&amp;nbsp;&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;Ensuring the Development Team understands items in the Product Backlog to the level needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
&lt;strong&gt;The Product Owner is one person, not a committee.&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
If someone whant to change a Product Backlog item&#39;s pritority must address the Product Owner.&lt;/div&gt;
&lt;h2 class=&quot;p1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
The Development Team&lt;/h2&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Development Teams&amp;nbsp;&lt;strong&gt;must&lt;/strong&gt;&amp;nbsp;have the following characteristics:&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;They are self-organizing. No one (not even the Scrum Master) tells the Development Team how to turn Product Backlog into Increments of potentially releasable functionality&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
Development Teams are cross-functional, with all of the skills as a team necessary to create a product Increment&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Scrum recognizes no titles for Development Team members other than Developer, regardless of the work being performed by the person; there are no exceptions to this rule&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Scrum recognizes no sub-teams in the Development Team, regardless of particular domains that need to be addressed like testing or DevOps, there are no exceptions to this rule&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The development team size must be even number, but not small than 4 and not bigger that 8.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
The Scrum Master&lt;/h2&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Scrum Master is a person within The Development Team.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Scrum Master is responsible for ensuring Scrum is understood and enacted. Scrum Masters do this by ensuring that the Scrum Team adheres to Scrum theory, practices, and rules.&amp;nbsp;&lt;/div&gt;
&lt;h3 class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Scrum Master Service to the Product Owner&lt;/h3&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Scrum Master serves the Product Owner in several ways, including:&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Finding techniques for effective Product Backlog management&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Ensuring the Product Owner knows how to arrange the Product Backlog&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
&amp;nbsp;Facilitating Scrum events as requested or needed&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 16px; line-height: 1.5; margin: 30px 0px 0px;&quot;&gt;
Scrum Master Service to the Development Team&lt;/h3&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
The Scrum Master serves the Development Team in several ways, including:&amp;nbsp;&lt;/div&gt;
&lt;ul style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin: 10px 0px 0px;&quot;&gt;
&lt;li class=&quot;p1&quot;&gt;Coaching the Development Team in self-organization and cross-functionality&lt;/li&gt;
&lt;li class=&quot;p1&quot;&gt;&lt;div class=&quot;p1&quot;&gt;
Facilitating Scrum events as requested or needed&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;p1&quot;&gt;
Coaching the Development Team in organizational environments in which Scrum is not yet fully adopted and understood&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 style=&quot;border-bottom-color: rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 24px; font-weight: normal; line-height: 1.25; margin: 30px 0px 0px;&quot;&gt;
Specific engineering practices&lt;/h1&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Scrum itself doesn&#39;t prescribe specific engineering practices, they are part of XP,&amp;nbsp;&lt;strong&gt;but for a software company to be truly agile, techniques such as TDD and Pair Programming, are a must&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
Obs.: This article is based on my experience working in agile teams. Please feel free to add a comment for the points that you think they can be improved.&lt;/div&gt;
&lt;div class=&quot;p1&quot; style=&quot;color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; margin-top: 10px; word-wrap: break-word;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/4917737985134051154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2015/11/scrum-short-introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4917737985134051154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4917737985134051154'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2015/11/scrum-short-introduction.html' title='SCRUM a short introduction'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-5979475390762384632</id><published>2015-11-02T19:34:00.001+01:00</published><updated>2015-11-02T19:37:57.541+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ant"/><category scheme="http://www.blogger.com/atom/ns#" term="Build"/><category scheme="http://www.blogger.com/atom/ns#" term="Gradle"/><category scheme="http://www.blogger.com/atom/ns#" term="Groovy"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><category scheme="http://www.blogger.com/atom/ns#" term="Scala"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Choose Gradle</title><content type='html'>&lt;h2&gt;
Intro&lt;/h2&gt;
&lt;h2&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
Recently I had to take a decision regarding to migration of a very old build system based on ant and a lot of shell scripts to a modern build system, that is using a repository.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
Initially I had a look to maven, but because the project has using some custom ant tasks, then my decision to use gradle was obvious, because gradle is having a better integration with ant.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
As you can see the decision to choose gradle was more or less circumstantial, but now I don&#39;t regret the decision, and I started to use gradle also for new projects.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/h2&gt;
&lt;h2&gt;
Why Gradle?&lt;/h2&gt;
&lt;h2&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
1. Gradle is having a very good documentation&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;The gradle documentation is complete, comprehensive and easy to navigate.&lt;br /&gt;
&lt;br /&gt;
2. Gradle is having a very small learning curve&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; As a software developer you will find very comfortable to write build scripts using gradle, because the Gradle DSL is based on groovy.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
3. Gradle is flexible&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; It has ANT&#39;s power and flexibility and Maven life-cycle and easy to use. With gradle you can easily resolve complex custom built tasks.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
4. You can easily create unified cross platform builds&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; You create multi-projects builds that are combining different languages, like Java, Scala, Groovy, C++, Javascript etc.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
5. Can be integrate with almost everything, from CI tools to repositories etc.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;
6. With gradle is easy to override the default tasks&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;
7. Gradle provide a very good testing environment for custom plugins.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&amp;nbsp; &lt;br /&gt;
This are my reason to choose gradle.&lt;br /&gt;
&lt;br /&gt;
If you would like to have some example for any of the displayed reasons, just post a comment and I&#39;ll provide you a use case wiht a short example.&lt;/div&gt;
&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/h2&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/5979475390762384632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2015/11/choose-gradle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/5979475390762384632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/5979475390762384632'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2015/11/choose-gradle.html' title='Choose Gradle'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-1321213575827300759</id><published>2015-04-24T15:35:00.001+02:00</published><updated>2015-09-29T20:56:37.170+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Embedded"/><category scheme="http://www.blogger.com/atom/ns#" term="fatjar"/><category scheme="http://www.blogger.com/atom/ns#" term="Gradle"/><category scheme="http://www.blogger.com/atom/ns#" term="Guice"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Jersey"/><category scheme="http://www.blogger.com/atom/ns#" term="Microservices"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring-boot"/><title type='text'>Be agile, go light</title><content type='html'>&lt;h2&gt;
Motivation&lt;/h2&gt;
&lt;div&gt;
Solutions like spring-boot (http://projects.spring.io/spring-boot/) or dropwizard (http://www.dropwizard.io/) can give you to much over head.&lt;/div&gt;
&lt;div&gt;
In this case why not to use a simple approach and instead of downloading the internet to include in your project strictly the required libraries for the job.&lt;/div&gt;
&lt;h2&gt;
Where to start&lt;/h2&gt;
&lt;div&gt;
All you need is gradle or maven and a class loader.&lt;/div&gt;
&lt;div&gt;
Gradle and maven we know where to find it, but what about the class loader?&lt;/div&gt;
&lt;div&gt;
Should we write our own class loader or we should use and existing one?&lt;/div&gt;
&lt;div&gt;
I&#39;ll go the second alternative: to use an existing one.&lt;/div&gt;
&lt;div&gt;
My preference for the class loader will be spring-boot-loader (https://github.com/spring-projects/spring-boot/tree/master/spring-boot-tools/spring-boot-loader).&lt;/div&gt;
&lt;h2&gt;
All together&lt;/h2&gt;
&lt;div&gt;
For demonstrating this simple approact I&#39;ve created a small demo with Google Guice, Embedded Jetty and Jersey 2.&lt;/div&gt;
&lt;h3&gt;
Gradle file&lt;/h3&gt;
&lt;div&gt;
Two parts are important in gradle file:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;configurations&lt;/li&gt;
&lt;li&gt;dependecies&lt;/li&gt;
&lt;li&gt;additional tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
Configurations&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
Create a custom configuration called &quot;loader&quot; like in the below example:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush:java&quot;&gt;configurations {
    loader
}
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h4&gt;
Dependencies&lt;/h4&gt;
&lt;div&gt;
Add a dependency to spring-boot-loader using loader configuration:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush:java&quot;&gt;loader(&quot;org.springframework.boot:spring-boot-loader:1.2.3.RELEASE&quot;)
&lt;/pre&gt;
&lt;h4&gt;
Additional tasks&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
Create one task for unpacking the spring-boot-loader and override the jar task.&lt;br /&gt;
Unpack loader task will unpack the spring-boot-loader jar in $buildDir/classes.&lt;br /&gt;
The jar task will copy all the dependent jars to lib folder inside of output jar without compression.&lt;br /&gt;
If we will use compression, then the spring boot class loader will be unable to load your jars.&lt;br /&gt;
&lt;br /&gt;
For more details have a look to the next example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;task unpackLoader(type: Copy) {
    from {
        configurations.loader.collect {
            zipTree(it)
        }

    }
    include &#39;**/*.class&#39;
    into &quot;$buildDir/classes/main/&quot;

    includeEmptyDirs = false

}

jar {
    dependsOn unpackLoader
    into(&#39;lib&#39;) {
        from configurations.runtime
    }
    entryCompression org.gradle.api.tasks.bundling.ZipEntryCompression.STORED
    manifest {
        attributes(&quot;Main-Class&quot;: &quot;org.springframework.boot.loader.JarLauncher&quot;,
                &quot;Start-Class&quot;: &quot;&lt;i&gt;here specify your main class&lt;/i&gt;&quot;)
    }
}
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
Run it as an executable jar&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
After the you have implemented your java code and you setup the correct value for the main class in manifest file you just have to execut gradle build task.&lt;/div&gt;
&lt;div&gt;
After this cd in $buildDirectory/libs and execute command:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;java -jar &quot;&lt;i&gt;your jar file name&lt;/i&gt;&quot;&lt;/pre&gt;
&lt;div&gt;
&lt;h3&gt;
Demo&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
A full demo for this approach can be found here:&amp;nbsp;&lt;a href=&quot;https://github.com/atdi/golight&quot;&gt;https://github.com/atdi/golight&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For this demo i was using: gradle 2.3, google guice, jersey 2 and embedded jetty&lt;br /&gt;
&lt;br /&gt;
As we can see with minimum effort you can create an executable jar without hard dependency to any technology or framework.&lt;br /&gt;
&lt;br /&gt;
That&#39;s all folks!&lt;br /&gt;
&lt;br /&gt;
P.S: I&#39;ve added also an example with spring as DI framework:&amp;nbsp;&lt;a href=&quot;https://github.com/atdi/golight-spring&quot;&gt;https://github.com/atdi/golight-spring&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/1321213575827300759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2015/04/be-agile-go-light.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/1321213575827300759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/1321213575827300759'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2015/04/be-agile-go-light.html' title='Be agile, go light'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7634363475980039786.post-4111702123195595080</id><published>2011-04-17T21:26:00.000+02:00</published><updated>2014-06-22T17:35:20.849+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Guice"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JPA"/><title type='text'>JPA with Google Guice</title><content type='html'>&lt;b&gt;Intro&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This post will demonstrate how to configure Google Guice with JPA.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Development environment&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Eclipse Helios for JEE programmers&lt;/li&gt;
&lt;li&gt;Maven plugin- http://m2eclipse.sonatype.org/sites/m2e&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Setup project&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Create a new Maven project and select the archetype with artifact jpa-maven-archetype.&lt;br /&gt;
Now with all this done let&#39;s move on to have some fun.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Edit pom.xml file&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Remove junit dependency and add the latest junit release, in my case 4.8.2 and set the scope to &quot;test&quot;&lt;/li&gt;
&lt;li&gt;Remove hibernate-entitymanager and geronimo-spec-jta and add hibernate-entitymanager version 3.4.0.GA and set the type to jar&lt;/li&gt;
&lt;li&gt;Add  hibernate-core version 3.3.2.GA and set the type to jar &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Add guice version 3.0&lt;/li&gt;
&lt;li&gt;Add guice-persist version 3.0&lt;/li&gt;
&lt;/ul&gt;
Because all the settings are done we can proceed to next step.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;JPA layer&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In JPA layer will be create 2 simple entities: User and Role with a many to many relation between them.&lt;br /&gt;
Both entities will inherit the AbstractEntity class. We create AbstractEntity class because maybe not all entities will use the same type for the ID and we want to create generic DAO classes.&lt;br /&gt;
&lt;br /&gt;
AbstractEntity class:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;public abstract class AbstractEntity
&amp;lt;P&amp;gt;
 implements Serializable {
 public abstract P getId();
}&lt;/pre&gt;
&lt;br /&gt;
User class:&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;@Entity
@Table(name = &quot;demo_user&quot;)
@NamedQueries({@NamedQuery(name=&quot;User.GetAll&quot;, query = &quot;from User&quot;)})
public class User extends AbstractEntity
&amp;lt;Long&amp;gt;
 {

 @Id
 @SequenceGenerator(name = &quot;USER_ID_GENERATOR&quot;, sequenceName = &quot;SEQ_USER&quot;)
 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = &quot;USER_ID_GENERATOR&quot;)
 private Long id;
 
 private String password;
 
 private Boolean status;

 private String username;
 
 @ManyToMany(fetch = FetchType.LAZY)
 @JoinTable(name = &quot;user_role&quot;, joinColumns = { @JoinColumn(name = &quot;user_id&quot;) }, inverseJoinColumns = { @JoinColumn(name = &quot;role_id&quot;) })
 private List&amp;lt;Role&amp;gt; roles;
 /**
  * 
  */
 public User() {
  
 }


 @Override
 public Long getId() {
  return id;
 }

 public void setPassword(String password) {
  this.password = password;
 }

 public String getPassword() {
  return password;
 }

 public void setStatus(Boolean status) {
  this.status = status;
 }

 public Boolean getStatus() {
  return status;
 }

 public void setUsername(String username) {
  this.username = username;
 }

 public String getUsername() {
  return username;
 }

 public void setRoles(List&amp;lt;Role&amp;gt; roles) {
  this.roles = roles;
 }

 public List&amp;lt;Role&amp;gt; getRoles() {
  return roles;
 }

}

&lt;/pre&gt;
&lt;br /&gt;
Create an interface called GenericDAO:&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;public interface GenericDAO&amp;lt;E extends AbstractEntity, P&amp;gt;
{
 /**
  * Persist the indicated entity to database
  * @param entity
  * @return the primary key
  */
 P insert(E entity);
 
 /**
  * Retrieve an object using indicated ID
  * @param id
  * @return
  */
 E find(P id);

 /**
  * Update indicated entity to database
  * @param entity
  */
 void update(E entity);
 
 /**
  * Delete indicated entity from database
  * @param entity
  */
 void delete(E entity);
 
 /**
  * Return the entity class
  * @return
  */
 Class&amp;lt;E&amp;gt; getEntityClass();
 
 /**
  * Get the entity manager
  * @return
  */
 EntityManager getEntityManager();
 
 /**
  * 
  * @return
  */
 List&amp;lt;E&amp;gt; findAll();
}
&lt;/pre&gt;
&lt;br /&gt;
Implement the interface in GenericDAOImpl class:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;public abstract class GenericDAOImpl&amp;lt;E extends AbstractEntity, P&amp;gt; implements
  GenericDAO&amp;lt;E, P&amp;gt; {
 @Inject
 private EntityManager entityManager;
 private Class&amp;lt;E&amp;gt; entityClass;

 @SuppressWarnings(&quot;unchecked&quot;)
 public P insert(E entity) {
  entityManager.persist(entity);
  return (P)entity.getId();
 }

 public E find(P id) {
  return entityManager.find(getEntityClass(), id);
 }

 public void update(E entity) {
  entityManager.merge(entity);
 }

 public void delete(E entity) {
  entityManager.remove(entity);
 }

 public EntityManager getEntityManager() {
  return entityManager;
 }

 @SuppressWarnings(&quot;unchecked&quot;)
 public Class&amp;lt;E&amp;gt; getEntityClass() {
  if (entityClass == null) {
   Type type = getClass().getGenericSuperclass();
   if (type instanceof ParameterizedType) {
    ParameterizedType paramType = (ParameterizedType) type;

    entityClass = (Class&amp;lt;E&amp;gt;) paramType.getActualTypeArguments()[0];

   } else {
    throw new IllegalArgumentException(
      &quot;Could not guess entity class by reflection&quot;);
   }
  }
  return entityClass;
 }
 
 @SuppressWarnings(&quot;unchecked&quot;)
 @Override
 public List&amp;lt;E&amp;gt; findAll() {
  return this.entityManager.createNamedQuery(getEntityClass().getSimpleName()+&quot;.GetAll&quot;).getResultList();
 }
    
}
&lt;/pre&gt;
&lt;br /&gt;
Obs: I haven&#39;t used @Transactional annotation, because I prefer to use this on specific methods where I am making multiple database operations.&lt;br /&gt;
&lt;br /&gt;
Extend GenericDAOImpl in UserDAO and RoleDAO classes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Create the Guice persistence module&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Create a class called JPAInitializer in order to initialize the persistence service when is necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;@Singleton
public class JPAInitializer
{

 @Inject
 public JPAInitializer(final PersistService service)
 {
  service.start();
 }
}
&lt;/pre&gt;
&lt;br /&gt;
Create PersistenceModule class and configure the bindings inside of configure method:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;public class PersistenceModule extends AbstractModule {

 /* (non-Javadoc)
  * @see com.google.inject.AbstractModule#configure()
  */
 @Override
 protected void configure() {
  install(new JpaPersistModule(&quot;demo-jpa-test&quot;));
  bind(JPAInitializer.class).asEagerSingleton();
  bind(new TypeLiteral&amp;lt;GenericDAO&amp;lt;User, Long&amp;gt;&amp;gt;() {
  }).to(new TypeLiteral&amp;lt;UserDAO&amp;gt;() {
  });
  bind(new TypeLiteral&amp;lt;GenericDAO&amp;lt;Role, Long&amp;gt;&amp;gt;() {
  }).to(new TypeLiteral&amp;lt;RoleDAO&amp;gt;() {
  });

 }

}
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Test the DAO&#39;s&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Because testing is very important below can be found UserDAOTest that will demonstrate how to test this implementation:&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;public class UserDAOTest {
 
 @Inject
 GenericDAO&amp;lt;User, Long&amp;gt; dao;

 @Before
 public void setUp() throws Exception
 {
  Injector injector = Guice.createInjector(new PersistenceModule());
  injector.injectMembers(this);
  dao.getEntityManager().getTransaction().begin();
 }

 /**
  * @throws java.lang.Exception
  */
 @After
 public void tearDown() throws Exception
 {
  dao.getEntityManager().getTransaction().rollback();
 }
 
 @Test
 public void testInsert() {
  User user = new User();
  user.setUsername(&quot;user1&quot;);
  user.setPassword(&quot;password&quot;);
  user.setStatus(Boolean.TRUE);
  dao.insert(user);
  assertNotNull(user.getId());
 }
 
 @Test
 public void testFindsetUsername(&quot;user1&quot;);
  user.setPassword(&quot;password&quot;);
  user.setStatus(Boolean.TRUE);
  Long id = dao.insert(user);
  assertNotNull(dao.find(id));
 }

 @Test
 public void testUpdate() {
  User user = new User();
  user.setUsername(&quot;user1&quot;);
  user.setPassword(&quot;password&quot;);
  user.setStatus(Boolean.TRUE);
  Long id = dao.insert(user);
  user.setUsername(&quot;user2&quot;);
  User user2 = dao.find(id);
  assertEquals(&quot;user2&quot;, user2.getUsername());
 }


 @Test
 public void testDelete() {
  User user = new User();
  user.setUsername(&quot;user1&quot;);
  user.setPassword(&quot;password&quot;);
  user.setStatus(Boolean.TRUE);
  Long id = dao.insert(user);
  dao.delete(user);
  assertNull(dao.find(id));
 }


 @Test
 public void testGetEntityManager() {
  assertNotNull(dao.getEntityManager());
 }


 @Test
 public void testGetEntityClass() {
  assertEquals(User.class, dao.getEntityClass());
 }


 @Test
 public void testFindAll() {
  User user = new User();
  user.setUsername(&quot;user1&quot;);
  user.setPassword(&quot;password&quot;);
  user.setStatus(Boolean.TRUE);
  dao.insert(user);
 
  User user2 = new User();
  user2.setUsername(&quot;user2&quot;);
  user2.setPassword(&quot;password&quot;);
  user2.setStatus(Boolean.TRUE);
  dao.insert(user2);
  
  assertEquals(2, dao.findAll().size());
 }

}
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;Summary&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
More documentation and tutorials about Google Guice you can find at this url &lt;a href=&quot;http://code.google.com/p/google-guice/&quot;&gt;http://code.google.com/p/google-guice/&lt;/a&gt; and about JPA at this URL &lt;a href=&quot;http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html&quot;&gt;http://www.oracle.com/technetwork/articles/javaee/jpa-137156.html&lt;/a&gt;.&lt;br /&gt;
That&#39;s all!</content><link rel='replies' type='application/atom+xml' href='http://aurelavramescu.blogspot.com/feeds/4111702123195595080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://aurelavramescu.blogspot.com/2011/04/jpa-with-google-guice.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4111702123195595080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7634363475980039786/posts/default/4111702123195595080'/><link rel='alternate' type='text/html' href='http://aurelavramescu.blogspot.com/2011/04/jpa-with-google-guice.html' title='JPA with Google Guice'/><author><name>Aurel Avramescu</name><uri>http://www.blogger.com/profile/10058090813254446522</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>