GithubHelp home page GithubHelp logo

lukehuang / fabric8-ansible-spring-boot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabric8io/fabric8-ansible-spring-boot

0.0 3.0 0.0 38.97 MB

an Ansible playbook for provisioning Spring Boot apps

License: BSD 3-Clause "New" or "Revised" License

fabric8-ansible-spring-boot's Introduction

Kansible demo for Spring Boot

This is a simple example of provisioning an executable Spring Boot jar with Ansible.

Environment (machines)

We use Ansible to install the Java App on application servers (appservers group).

How to use it

Required software:

You can download latest version of Vagrant from its homepage. Ansible can be installed using system package manager or pip.

Required hardware:

  • Linux like operating system
  • at least 2GB of RAM (each machine from this sample uses at most 512MB of RAM).

Start machines

To test Ansible scripts you need to start vagrant machines. We provide Vagrantfile with suitable configuration. To start all machines invoke command:

vagrant up

Starting machines for the first time might take few minutes, since Vagrant has to download CentOS image.

Provision machines

Provisioning is done by Ansible. On application servers Ansible scripts install and configure Oracle Java JRE and the App. Invoke this command to provision all machines:

ansible-playbook -i inventory provisioning/site.yml -vv --ask-vault-pass

Ansible Vault

During the provisioning you will be prompted for Ansible Vault password, type: vault. It is used for decrypting vault.yml file which holds the credentials for HAProxy statistics page. You can view the statistics page by accessing following address: http://10.10.1.10:8080. Default credentials are - user: admin password: password.

Open your web browser, application is available at http://10.10.1.20/8080/.


1: Since v.1.7.0 Vagrant has started generating separate SSH key for each machine making provisioning process more difficult. In prior version there was only a single key for all of the machines - ~/.vagrant.d/insecure_private_key. After v.1.7.0 each machine has its own key located in .vagrant/machines/<<machine name>>/virtualbox/private_key. For further details see: Using Vagrant and Ansible: Running Ansible Manually

fabric8-ansible-spring-boot's People

Contributors

jstrachan avatar rhuss avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.