未加星标

5 Minutes Stacks, episode 52 : iceHRM

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏
Episode 52 : iceHRM
5 Minutes Stacks, episode 52 : iceHRM

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 inphp 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.

Preparations The Versions Ubuntu 16.04 Apache 2.4.18 MariaDB Galera Cluster 5.5.53 GlusterFS 3.7.6 iceHRM 18.0.OS The prerequisites to deploy this stack

These should be routine by now:

An Internet access A linux shell ACloudwatt account with avalid keypair The tools of the trade: OpenStack CLI A local clone of the Cloudwatt applications git repository (if you are creating your stack from a shell) Size of the instance

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 thePricing page on the Cloudwatt website).

Stack parameters, of course, are yours to tweak at your fancy.

By the way…

If you do not like command lines, you can go directly to the “run it thru the console” section by clicking

What will you find in the repository

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. Start-up Initialize the environment

Have your Cloudwatt credentials in hand and clickHERE. 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.

Adjust the parameters

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 [...] Start stack

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:

Starts two Ubuntu Xenial based instances preprovisionned with the iceHRM stack Expose it on the Internet via a floating IP All of this is fine, but… You do not have a way to create the stack from the console?

We do indeed! Using the console, you can deploy iceHRM:

Go the Cloudwatt Github in the applications/bundle-xenial-icehrm repository Click on the file named bundle-xenial-icehrm.heat.yml Click on RAW, a web page will appear containing purely the template Save the file to your PC. You can use the default name proposed by your browser (just remove the .txt) Go to the Stacks section of the console Click on Launch stack , then Template file and select the file you just saved to your PC, and finally click on NEXT Name your stack in the Stack name field Enter the name of your keypair in the SSH Keypair field Write a passphrase that will be used for the database icehrmuser Choose your instance size using the Instance Type dropdown and click on LAUNCH

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!

A one-click deployment sounds really nice…

… Good! Go to theApps 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.

Enjoy

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:


5 Minutes Stacks, episode 52 : iceHRM

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.


5 Minutes Stacks, episode 52 : iceHRM

The default username and password to connect to iceHRM are admin .


5 Minutes Stacks, episode 52 : iceHRM

You can now discover the iceHRM’s interface:


5 Minutes Stacks, episode 52 : iceHRM

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.

So watt?

The goal of this tutorial is to accelerate your start. At this point you are the master of the stack.

Some useful links:

Home iceHRM Help iceHRM

Have fun. Hack in peace.

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: OpenStackUbuntuXenGitPHPLinuxGREUTAU
分页:12
转载请注明
本文标题:5 Minutes Stacks, episode 52 : iceHRM
本站链接:http://www.codesec.net/view/530912.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(43)