Friday, 25 October 2013

RACKSPACE CLOUD FILES FROM THE COMMAND LINE


It is also possible to control your rackspace cloud files using the openstack swift client, the first thing we need to do is install the package



[ nitin@nitin-ubuntu:~ ]# sudo spt-get install python-swiftclient keystone



Create the file rack.sh this file will be used to setup our environment anytime we want to use swift, it should look something like this 



[ nitin@nitin-ubuntu:~ ]# sudo vim /etc/profile.s/rack.sh



export OS_USERNAME=MossoCloudFS_22321312740217423749237492:myusername
export OS_PASSWORD=mypassword
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/



[ nitin@nitin-ubuntu:~ ]# keystone tenant-list





+---------------------------------------------------+---------------------------------------------------+---------+
|                         id                        |                        name                       | enabled |
+---------------------------------------------------+---------------------------------------------------+---------+
| MossoCloudFS_22321312740217423749237492    True  |
+---------------------------------------------------+---------------------------------------------------+---------+

If you worked through my last post you’ll notice some differences about this file, two differences we 
should note

OS_TENANT_NAME : for the version of swift client I am using this is absent but in future versions it may be back again, in which case os_tenant_name should be set to the tenant name and the value for OS_USERNAME should not contain the tenant name
OS_USERNAME : this contains the tenant name, in addition to the user name but it is not the same as the tenant name we used for nova. On rackspace a different tenant is used for cloud servers and cloud files. What we need to do is get the tenant name for our cloud files account. In order to get this you can run the command below (replace the username and password in the command)



[ nitin@nitin-ubuntu:~ ]#  source /etc/profile

Now your ready, lets go
List all of container 
[ nitin@nitin-ubuntu:~ ]# Swift list







Thursday, 24 October 2013

RACKSPACE CLOUD SERVERS FROM THE COMMAND LINE



With rackspaces providing its compute service based on OpenStack, its possible to control your servers using the openstack nova client and its fairly simple to do.
You start by installing the openstack-novaclient (these examples are done on fedora 17). For now python-setuptools is needed here as a dependency.
step 1 :- 
[ nitin@nitin-ubuntu:~ ]#   sudo yum install python-setuptools python-novaclient

Create the file rack.sh this file will be used to setup our environment anytime we want to use nova, it should look something like this 


[ nitin@nitin-ubuntu:~ ]# sudo vim /etc/profile.s/rack.sh

export OS_USERNAME=username
export OS_PASSWORD=passwd
export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
export OS_REGION_NAME=DFW
export OS_TENANT_NAME=1234567
export NOVA_SERVICE_NAME=cloudServersOpenStack


OS_USERNAME : This is your login name for your rackspace Open Cloud accountOS_PASSWORD : Your password….OS_AUTH_URL : this is the url to the rackspaces identity managment server, if you have a rackspace.co.uk account then this should be set to https://lon.identity.api.rackspacecloud.com/v2.0/ , leave it as above if your rackspace account is.com
OS_REGION_NAME : the code for the data center in which you want to control servers (DFW is Dallas, ORD Chicago, LON London), Use DFW or ORD if rackspace.com or LON if rackspace.co.ukOS_TENANT_NAME : the id for your account, you can get this in the top right hand corner of the control panel when you log in
[ nitin@nitin-ubuntu:~ ]#  source /etc/profile

Now your ready, lets go
List all of your running servers
[ nitin@nitin-ubuntu:~ ]#  nova list




Wednesday, 16 October 2013

HIVE-HBASE INTEGRATION





Step 1 :- 


hive --auxpath /usr/lib/hive/lib/hive-hbase-handler-0.7.1-cdh3u6.jar,/usr/lib/hive/lib/hbase-0.90.6-cdh3u6.jar,/usr/lib/hive/lib/zookeeper-3.3.5-cdh3u6.jar,/usr/lib/hive/lib/guava-r06.jar -hiveconf hbase.master=<HMASTER IP ADDRESS>:60000



Ansible Cheat sheet

Install Ansible  # yum install ansible Host file configuration  File  [ansible@kuber2 ~]$ cat /etc/ansible/hosts     [loca...