iceHRM is a Human Resources Management tool allowing to manage a company ant its employees. It is possible to add their personnal information, to create plannings, payslips and to set up some projects. The interface is really intuitive.
iceHRM is developed in PHP and uses a MariaDB database to save all the data it needs.
This episode will help you to deploy iceHRM with a High Availability (HA) on a cluster of two instances behind a load-balancer, each instance being mutually replicated in real time.
These should be routine by now:
By default, the stack deploys two instances of type “Standard 1” (n1.cw.standard-1). A variety of other instance types exist to suit your various needs, allowing you to pay only for the services you need. Instances are charged by the minute and capped at their monthly price (you can find more details on the Pricing page on the Cloudwatt website).
Stack parameters, of course, are yours to tweak at your fancy.
If you do not like command lines, you can go directly to the “run it thru the console” section by clicking here
Once you have cloned the github, you will find in the bundle-xenial-icehrm/
repository:
bundle-xenial-icehrm.heat.yml
: HEAT orchestration template. It will be use to deploy the necessary infrastructure.stack-start.sh
: Stack launching script. This is a small script that will save you some copy-paste.stack-get-url.sh
: Flotting IP recovery script.Have your Cloudwatt credentials in hand and click HERE. If you are not logged in yet, you will go thru the authentication screen then the script download will start. Thanks to it, you will be able to initiate the shell accesses towards the Cloudwatt APIs.
Source the downloaded file in your shell. Your password will be requested.
$ source COMPUTE-[...]-openrc.sh
Please enter your OpenStack Password:
Once this done, the Openstack command line tools can interact with your Cloudwatt user account.
With the bundle-xenial-icehrm.heat.yml
file, you will find at the top a section named parameters
. The parameters to adjust are keypair_name
and sqlpass
. Their default
value must contain respectively a valid keypair with regards to your Cloudwatt user account and the password you want to use to the iceHRM database. This is within this same file that you can adjust the instance size by playing with the flavor
parameter.
heat_template_version: 2013-05-23
description: All-in-one iceHRM stack
parameters:
keypair_name:
description: Keypair to inject in instance
label: SSH Keypair
type: string
flavor_name:
default: n1.cw.standard-1
description: Flavor to use for the deployed instance
type: string
label: Instance Type (Flavor)
constraints:
- allowed_values:
- n1.cw.standard-1
- n1.cw.standard-2
- n1.cw.standard-4
- n1.cw.standard-8
- n1.cw.standard-12
- n1.cw.standard-16
volume_attachment:
description: Attacher un volume cinder de 20GO ?
default: 0
type: string
[...]
In a shell, run the script stack-start.sh
with his name in parameter:
./stack-start.sh iceHRM
+--------------------------------------+-----------------------+--------------------+----------------------+
| id | stack_name | stack_status | creation_time |
+--------------------------------------+-----------------------+--------------------+----------------------+
| 4785c76e-3681-4b02-8a91-a7a3cc4a6440 | iceHRM | CREATE_IN_PROGRESS | 2016-12-21T13:53:56Z |
+--------------------------------------+-----------------------+--------------------+----------------------+
Within 5 minutes the stack will be fully operational. (Use watch
to see the status in real-time)
$ watch heat resource-list iceHRM
+-----------------------+------------------------------------+-----------------+----------------------+
| resource_name | resource_type | resource_status | updated_time |
+-----------------------+------------------------------------+-----------------+----------------------+
| inst1 | OS::Nova::Server | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| inst1_cinder | OS::Heat::ResourceGroup | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| inst1_port | OS::Neutron::Port | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| inst2 | OS::Nova::Server | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| inst2_cinder | OS::Heat::ResourceGroup | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| inst2_port | OS::Neutron::Port | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| lbaas | OS::Neutron::LoadBalancer | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| lbaas_pool | OS::Neutron::Pool | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| lbaas_pool_vip | OS::Neutron::FloatingIPAssociation | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| lbaas_vip_floating_ip | OS::Neutron::FloatingIP | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| lbaas_vip_port | OS::Neutron::Port | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| network | OS::Neutron::Net | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| security_group | OS::Neutron::SecurityGroup | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
| subnet | OS::Neutron::Subnet | CREATE_COMPLETE | 2016-12-21T13:53:57Z |
+-----------------------+------------------------------------+-----------------+----------------------+
The start-stack.sh
script takes care of running the API necessary requests to execute the normal heat template which:
We do indeed! Using the console, you can deploy iceHRM:
bundle-xenial-icehrm.heat.yml
The stack will be automatically generated (you can see its progress by clicking on its name). When all modules become green, the creation will be complete. You can then go to the “Instances” menu to find the floating IP, or simply refresh the current page and check the Overview tab for a handy link.
If you’ve reached this point, you’re already done! Go enjoy iceHRM!
… Good! Go to the Apps page on the Cloudwatt website, choose the apps, press DEPLOY and follow the simple steps… 2 minutes later, a green button appears… ACCESS: you have iceHRM.
You are now in possession of iceHRM, you can enter via the URL http://ip-floatingip
. Your full URL will be present in your stack overview in horizon Cloudwatt console.
The stack is composed like this:
At your first connexion you will ask to give the information about how to access to the database. Complete the fields as below, the password is which one you chose when you created the stack.
The default username and password to connect to iceHRM are admin
.
You can now discover the iceHRM’s interface:
You can now setup your Human Resources Management tool, this one being hosted in France in a safe environment, you can completely trust on this product.
The goal of this tutorial is to accelerate your start. At this point you are the master of the stack.
Some useful links:
Have fun. Hack in peace.
Cloudwatt 2016 - Copyright - Terms of use - Version Française
Photos: Nasa The Commons