tag:blogger.com,1999:blog-68384409434676366532024-03-21T06:02:09.759-07:00IT in StepsIT Simplified!!!Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-6838440943467636653.post-73582955672874685472014-06-23T22:22:00.001-07:002014-06-23T22:24:38.598-07:00Steps to configure Neutron LBaaS Agent for OpenStack Icehouse<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/admin-guide-cloud/content/install_neutron-lbaas-agent.html">http://docs.openstack.org/admin-guide-cloud/content/install_neutron-lbaas-agent.html</a>]<br />
<br />
<hr />
<br />
<b>Prerequisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-install-openstack-icehouse.html">http://itinsteps.blogspot.in/2014/06/steps-to-install-openstack-icehouse.html</a> to setup OpenStack.<br />
All Configuration details can be found there.<br />
<br />
<hr />
<br />
<br />
<b>Install the Neutron LBaaS Agent and HAProxy</b><br />
<br />
<b># yum -y install haproxy neutron-lbaas-agent</b><br />
<br />
<hr />
<br />
<b>For LBaaS to be configured properly, various configuration files must have the following changes.</b><br />
<br />
<br />
<b># vi /usr/share/neutron/neutron-dist.conf:</b><br />
<br />
service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default<br />
<br />
<hr />
<br />
<b># vi /etc/neutron/neutron.conf</b><br />
<br />
service_plugins = neutron.services.loadbalancer.plugin.LoadBalancerPlugin<br />
<br />
<br />
<b><b># </b>vi /etc/neutron/lbaas_agent.ini</b><br />
<br />
device_driver = neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver<br />
<br />
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver<br />
<br />
user_group = nobody<br />
<br />
<br />
<b><b># </b>vi /etc/openstack-dashboard/local_settings </b><br />
<b><br /></b>
OPENSTACK_NEUTRON_NETWORK = {'enable_lb': True,<br />
<br />
<br />
<hr />
<br />
Comment service_provider from the file <b>/usr/share/neutron/neutron-dist.conf</b> to avoid the following error in server.log:<br />
TRACE neutron.service Invalid: Driver neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver is not unique across providers<br />
<br />
<hr />
<br />
If the above configuration files were changed manually, restart the neutron-server service and neutron-lbaas-agent service. <br />
Also, restart the httpd service.<br />
<br />
# service httpd restart<br />
# service neutron-server restart<br />
# service neutron-lbaas-agent start<br />
# chkconfig --level 345 neutron-lbaas-agent on<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com1tag:blogger.com,1999:blog-6838440943467636653.post-72931488961748885252014-06-19T08:43:00.000-07:002014-06-19T08:43:08.860-07:00Steps to install Jenkins on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
<b>Prerequisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-oracle-java-jdk-7u60-on.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-oracle-java-jdk-7u60-on.html</a> to install Java on CentOS 6.<br />
<br />
<hr />
<br />
<b>Change the user to root</b><br />
<br />
sudo -s<br />
<br />
<hr />
<br />
<b>Install the Jenkins repository</b><br />
<br />
yum -y install wget<br />
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo<br />
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key<br />
<br />
<hr />
<br />
<b>Install Jenkins</b><br />
<br />
yum -y install jenkins<br />
<br />
<hr />
<br />
<b>Configure Jenkins to start with the system </b><br />
<br />
chkconfig jenkins on<br />
<br />
<hr />
<br />
<b>Configure Jenkins to start now</b><br />
<br />
service jenkins start<br />
<br />
<hr />
<br />
<b>Open Port 8080 in iptables</b><br />
<br />
vi /etc/sysconfig/iptables<br />
-A INPUT -p tcp -m multiport --dport 8080 -m comment --comment "Open port for Jenkins" -j ACCEPT<br />
service iptables restart<br />
<br />
<hr />
<br />
Test the URL for Jenkins at http://<server-IP-address>:8080/<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-80106982613205297912014-06-09T08:00:00.002-07:002014-06-09T08:01:31.086-07:00Steps to setup Oracle Java JDK 7u60 on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
<b>Download the appropriate JDK RPM file (check for the correct architecture - 32 or 64 bit) </b><br />
<br />
This is the command for downloading the rpm for a 64bit architecture:<br />
<br />
# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-x64.rpm<br />
<br />
<hr />
<br />
<b>Install the JDK RPM</b><br />
# rpm -Uvh ~/jdk-7u60-linux-x64.rpm<br />
<br />
<hr />
<br />
<b>Install alternatives </b><br />
<br />
# alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_60/jre/bin/java 20000<br />
# alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_60/jre/bin/javaws 20000<br />
# alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_60/bin/javac 20000<br />
# alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_60/bin/jar 20000<br />
<br />
<hr />
<br />
<b>Update alternatives (Enter Selection ID of the installation you need to be selected as default)</b><br />
<br />
# alternatives --config java<br />
# alternatives --config javaws<br />
# alternatives --config javac<br />
# alternatives --config jar<br />
<br />
<hr />
<br />
<b>Check the default version of java</b><br />
<br />
# java -version<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-3489529471641940412014-06-09T05:24:00.001-07:002014-06-09T05:46:25.926-07:00Steps to create a volume in Cinder and attach it to an OpenStack instance<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/user-guide/content/cli_manage_volumes.html">http://docs.openstack.org/user-guide/content/cli_manage_volumes.html</a>]<br />
<br />
<hr />
<br />
<b>Prerequisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to create an instance in OpenStack.<br />
<br />
<hr />
<br />
<b>Set environment for your specific user and tenant</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br />
<b>Change the iptables rule for Cinder to allow command line access from an IP other than the OpenStack Controller Node</b><br />
<br />
On the Controller node, in file /etc/sysconfig/iptables, remove the line<br />
-A INPUT -s 192.168.2.6/32 -p tcp -m multiport --dports 3260,8776 -m comment --comment "001 cinder incoming cinder_192.168.2.6" -j ACCEPT<br />
<br />
and in its place, add the line<br />
-A INPUT -p tcp -m multiport --dports 3260,8776 -m comment --comment "Cinder incoming ALL" -j ACCEPT<br />
<br />
Restart iptables service to enable the change<br />
# service iptables restart<br />
<br />
<hr />
<br />
<b>Create a 10GB Volume</b><br />
<br />
# cinder create 10 --display-name <my-new-volume><br />
<br />
<hr />
<br />
<b>Gather required parameters</b><br />
<br />
# cinder list<br />
Note the <volume-ID> in the ID column of the list displayed. Make sure the "Attached to" column is empty.<br />
<br />
# nova list<br />
Note the <instance-ID> in the ID column of the list displayed. This will be the ID of the instance.<br />
<br />
<hr />
<br />
<b>Attach the volume to the instance</b><br />
<br />
# nova volume-attach <instance-ID> <volume-ID> <volume-drive-device><br />
<br />
<hr />
<br />
<b>SSH into the new instance using the floating IP and the private key file for <key-name></b><br />
<br />
# ssh -i <my-key>.pem <user-name>@<floating-IP><br />
<br />
Use fdisk to list the devices attached to the instance<br />
<br />
# sudo fdisk -l<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-65176031855868105052014-06-09T00:14:00.004-07:002014-06-09T00:16:55.416-07:00Steps to launch a new instance in OpenStack and ssh into it using a floating IP<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/user-guide/content/launch_from_image.html">http://docs.openstack.org/user-guide/content/launch_from_image.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to setup command line tools for OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html</a> to create a tenant and user for OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-initial-networks-for.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-initial-networks-for.html</a> to create public network, private network, and a router.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-add-image-to-openstack.html">http://itinsteps.blogspot.in/2014/06/steps-to-add-image-to-openstack.html</a> to add a new qcow2 image to OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-keypair-in-openstack.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-keypair-in-openstack.html</a> to create a new keypair in OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-and-update-security.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-and-update-security.html</a> to create a new security group in OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-new-flavor-in-openstack.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-new-flavor-in-openstack.html</a> to create a new flavor in OpenStack.<br />
<br />
<hr />
<br />
<b>Set environment for your specific user and tenant</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br />
<b>Gather required parameters</b><br />
<br />
# nova flavor-list<br />
Note the <flavor-ID> from the ID column displayed.<br />
<br />
# nova image-list<br />
Note the <image-ID> from the ID column displayed.<br />
<br />
# nova keypair-list<br />
Note the <key-name> from the Name column displayed.<br />
<br />
# nova secgroup-list<br />
Note the <secgroup> from the Name column displayed.<br />
<br />
# nova net-list<br />
Note the <tenant-network-ID> from the ID column for the tenant network (not the external network).<br />
<br />
# nova floating-ip-list<br />
Note the <floating-IP> from the Ip column, with "-" in the Fixed IP column, to get an unassociated floating IP.<br />
<br />
<hr />
<br />
<b>Create a new instance using parameters set above</b><br />
<br />
# nova boot --flavor <flavor-ID> \<br />
--image <image-ID> \<br />
--key-name <key-name> \<br />
--security-groups <secgroup> \<br />
--nic <net-id=net-uuid> \<br />
<instance-name><br />
<br />
<hr />
<br />
<b>Assign a floating IP to the instance created</b><br />
<br />
# nova floating-ip-associate <instance-name> <floating-IP><br />
<br />
<hr />
<br />
<b>SSH into the new instance using the floating IP and the private key file for <key-name></b><br />
<br />
# ssh -i <my-key>.pem <user-name>@<floating-IP><br />
<br />
<b>NOTE:</b> <br />
Full path for <my-key>.pem should be mentioned.<br />
1. Username for the instances will depend on the type of the image.<br />
2. Following are a few examples:<br />
CentOS 6.5 (http://repos.fedorapeople.org/repos/openstack/guest-images/centos-6.5-20140117.0.x86_64.qcow2): cloud-user<br />
Fedora 19 (http://cloud.fedoraproject.org/fedora-19.x86_64.qcow2): fedora<br />
Ubuntu 12.04 (http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img): ubuntu<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-53890974688440730522014-06-08T23:13:00.000-07:002014-06-08T23:13:00.821-07:00Steps to create a new flavor in OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/user-guide-admin/content/cli_manage_flavors.html">http://docs.openstack.org/user-guide-admin/content/cli_manage_flavors.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to setup command line tools for OpenStack.<br />
<br />
<hr />
<br />
<b>Set environment for admin</b><br />
<br />
# source ~/keystonerc_admin<br />
<br />
<hr />
<br />
<b>Create new flavor</b><br />
<br />
# nova flavor-create --is-public <true/false> <flavor-name> <flavor-ID> <RAM-in-MB> <root-disk-in-GB> <number-of-VCPUs><br />
<br />
Example of new flavor with 1GB RAM, 20GB Root Disk, and 3 VCPUs<br />
<br />
# nova flavor-create --is-public true VCPU3RAM1024DISK20 auto 1024 20 3<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-53709609796118450112014-06-08T23:03:00.001-07:002014-06-08T23:03:28.781-07:00Steps to create and update security group in OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/trunk/openstack-ops/content/security_groups.html">http://docs.openstack.org/trunk/openstack-ops/content/security_groups.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to setup command line tools for OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html</a> to create a tenant and user for OpenStack.<br />
<br />
<hr />
<br />
<b>Set environment for your specific user and tenant</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br />
<b>Create a new security group</b><br />
<br />
# nova secgroup-create <security-group-name> "<security-group-description>"<br />
<br />
<b>Example</b><br />
<br />
# nova secgroup-create secgroup1 "Create new default security group"<br />
<br />
<hr />
<br />
<b>Open port 22 for ssh access in the security group</b><br />
<br />
# nova secgroup-add-rule <secgroup> <ip-proto> <from-port> <to-port> <cidr><br />
<br />
<b>Example</b><br />
<br />
# nova secgroup-add-rule secgroup1 tcp 22 22 0.0.0.0/0<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-87246234151551033502014-06-07T18:29:00.003-07:002014-06-08T23:24:30.996-07:00Steps to create a keypair in OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/user-guide/content/cli_configure_instances.html">http://docs.openstack.org/user-guide/content/cli_configure_instances.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to setup command line tools for OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html</a> to create a tenant and user for OpenStack.<br />
<br />
<hr />
<br />
<b>Set environment for your specific user and tenant</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br />
<b>Create keypair</b><br />
<br />
# nova keypair-add <key-name> > <my-key>.pem<br />
<br />
<hr />
<br />
<b>Change permissions of the private key</b><br />
<br />
# chmod 400 <my-key>.pem<br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-20178762659771323332014-06-07T18:21:00.001-07:002014-06-08T23:23:00.383-07:00Steps to add an image to OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/trunk/openstack-ops/content/user_facing_images.html">http://docs.openstack.org/trunk/openstack-ops/content/user_facing_images.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to setup command line tools for OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html</a> to create a tenant and user for OpenStack.<br />
<br />
<hr />
<br />
<b>Download CentOS Qcow2 Image</b><br />
<br />
# wget http://repos.fedorapeople.org/repos/openstack/guest-images/centos-6.5-20140117.0.x86_64.qcow2<br />
<br />
<hr />
<br />
<b>Set environment for your specific user and tenant</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br />
<b>Upload image </b><br />
<br />
# glance image-create --name='<image-name>' --is-public=<true/false> \<br />
--container-format=<image-container-format> --disk-format=<image-disk-format> <image-file-location-on-disk><br />
<br />
Example<br />
<br />
# glance image-create --name='CentOS6.5_QCOW2' --is-public=true \<br />
--container-format=bare --disk-format=qcow2 < centos-6.5-20140117.0.x86_64.qcow2<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-69834130964913968582014-06-07T09:11:00.000-07:002014-06-08T23:40:39.898-07:00Steps to create initial networks for OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/icehouse/install-guide/install/yum/content/neutron-initial-networks.html">http://docs.openstack.org/icehouse/install-guide/install/yum/content/neutron-initial-networks.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisites</b><br />
<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html">http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html</a> to setup command line tools for OpenStack.<br />
Run steps from link <a href="http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html">http://itinsteps.blogspot.in/2014/06/steps-to-create-new-tenant-and-users-on.html</a> to create a tenant and user for OpenStack.<br />
<br />
<hr />
<br />
<b>Change the iptables rule for Neutron Server to allow command line access from an IP other than the OpenStack Controller Node</b><br />
<br />
On the Controller node, in file /etc/sysconfig/iptables, remove the line<br />
-A INPUT -s 192.168.2.6/32 -p tcp -m multiport --dports 9696 -m comment --comment "001 neutron server incoming neutron_server_192.168.2.6_192.168.2.6" -j ACCEPT<br />
<br />
and in its place, add the line<br />
-A INPUT -p tcp -m multiport --dports 9696 -m comment --comment "Neutron incoming ALL" -j ACCEPT<br />
<br />
Restart iptables service to enable the change<br />
# service iptables restart<br />
<br />
<hr />
<br />
<b>On the node where OpenStack Command Line tools are installed, set environment for the user admin tenant admin</b><br />
<br />
# source ~/keystonerc_admin<br />
<br />
<hr />
<br />
<b>Create external networ</b><br />
<br />
<b> </b># neutron net-create <external-network-name> --shared --router:external=True<br />
<br />
<b>Example</b><br />
<br />
# neutron net-create Ext1 --shared --router:external=True<br />
<br />
<hr />
<br />
<b>Create subnet for the external networ</b><br />
<br />
<b> </b># neutron subnet-create <external-network-name> --name <external-network-subnet-name> \<br />
--allocation-pool start=<start-floating-IP>,end=<end-floating-IP> \<br />
--disable-dhcp --gateway <external-network-gateway-IP> <external-network-CIDR><br />
<br />
<b>Example </b><br />
<br />
<b> </b># neutron subnet-create Ext1 --name Ext1Subnet1 \<br />
--allocation-pool start=192.168.3.51,end=192.168.3.230 \<br />
--disable-dhcp --gateway 192.168.3.1 192.168.3.0/24<br />
<br />
<hr />
<br />
<b>Set environment for your specific user and tenant</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br />
<b>Create tenant network</b><br />
<br />
# neutron net-create <tenant-network-name><br />
<br />
<b>Example</b><br />
<br />
# neutron net-create Private1<br />
<br />
<hr />
<br />
<b>Create subnet for the tenant network</b><br />
<br />
# neutron subnet-create <tenant-network-name> --name <tenant-network-subnet-name> \<br />
--gateway <tenant-network-gateway-IP> <tenant-network-CIDR><br />
<br />
<b>Example</b><br />
<br />
# neutron subnet-create Private1 --name Private1Subnet1 \<br />
--gateway 10.10.3.1 10.10.3.0/24<br />
<br />
<hr />
<br />
<b>Create a router on the tenant network </b><br />
<br />
# neutron router-create <router-name><br />
<br />
<b>Example</b><br />
<br />
# neutron router-create Router1<br />
<br />
<hr />
<br />
<b>Attach tenant networks to the router</b><br />
<br />
# neutron router-interface-add <router-name> <tenant-network-subnet-name><br />
<br />
<b>Example</b><br />
<br />
# neutron router-interface-add Router1 Private1Subnet1<br />
<br />
<hr />
<br />
<b>Attach external network to the router</b><br />
<br />
# neutron router-gateway-set <router-name> <external-network-name><br />
<br />
<b>Example</b><br />
<br />
# neutron router-gateway-set Router1 Ext1<br />
<br />
<hr />
<br />
<b>Verify network connectivity by pinging the tenant router gateway</b><br />
<b><br /></b># ping -c 4 <router-gateway-IP><br />
<br />
<b>Example</b><br />
<br />
# ping -c 4 192.168.3.51<br />
<br />
<hr />
<br />
<b>Assign Floating IP to the tenant</b><br />
<br />
# nova floating-ip-create <external-network-name><br />
<br />
Note the IP address as <floating-IP> to be used to assign to an instance. <br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com3tag:blogger.com,1999:blog-6838440943467636653.post-33574610136884887602014-06-06T20:55:00.001-07:002014-06-07T22:05:06.698-07:00Steps to create new tenant and users on OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Steps summarised from <a href="http://docs.openstack.org/grizzly/openstack-compute/admin/content/adding-users-tenants-and-roles-with-python-keystoneclient.html">http://docs.openstack.org/grizzly/openstack-compute/admin/content/adding-users-tenants-and-roles-with-python-keystoneclient.html</a>]<br />
<br />
<hr />
<br />
<b>Pre-requisite</b><br />
<br />
Run steps from link http://itinsteps.blogspot.in/2014/06/steps-to-setup-openstack-command-line.html to setup command line tools for OpenStack.<br />
<br />
<hr />
<br />
<b>Set the environment for OpenStack Administrator User</b><br />
<br />
# source ~/keystonerc_admin<br />
<br />
<hr />
<br />
<b>List all existing roles</b><br />
<br />
# keystone role-list<br />
<br />
<hr />
<br />
<b>Create new tenant or project</b><br />
<br />
# keystone tenant-create --name=<tenant-name><br />
<br />
<hr />
<br />
<b>List all tenants in OpenStack</b><br />
<br />
# keystone tenant-list<br />
<br />
<hr />
<br />
<b>Create User for OpenStack</b><br />
<br />
# keystone user-create --name=<user-name> --pass=<password> --email=<user-email-address><br />
<br />
<hr />
<br />
<b>Assign User to a tenant as a particular role</b><br />
<br />
# keystone user-role-add --user=<user-name> --tenant=<tenant-name> --role=<admin or _member_><br />
<br />
<hr />
<br />
<b>List all existing users</b><br />
<br />
# keystone user-list<br />
<br />
<hr />
<br />
<b>Create rc file for setting environment for new user</b><br />
<br />
# vi ~/keystonerc_<user-name><br />
export OS_USERNAME=<user-name><br />
export OS_TENANT_NAME=<tenant-name><br />
export OS_PASSWORD=<password><br />
export OS_AUTH_URL=http://<openstack-controller-IP>:5000/v2.0/<br />
export PS1='[\u@\h \W(keystone_<user-name>)]\$ '<br />
<br />
<hr />
<br />
<b>Set the environment for OpenStack New User</b><br />
<br />
# source ~/keystonerc_<user-name><br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com1tag:blogger.com,1999:blog-6838440943467636653.post-88863024691496536422014-06-06T05:44:00.003-07:002014-06-07T22:05:25.337-07:00Steps to setup OpenStack Command Line Tools on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
[Performed on a physical machine with CentOS 6.5, which is different from OpenStack Controller.<br />
Steps summarised from <a href="http://docs.openstack.org/user-guide/content/install_clients.html">http://docs.openstack.org/user-guide/content/install_clients.html</a>]<br />
<br />
<hr />
<br />
# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm<br />
# yum install python-pip<br />
<br />
<hr />
<br />
# for proj in ceilometer cinder glance heat keystone neutron nova swift trove; do<br />
pip install python-${proj}client<br />
done<br />
<br />
<hr />
<br />
# sftp root@<openstack-controller-IP><br />
>> get keystonerc_admin<br />
>> bye<br />
<br />
# source ~/keystonerc_admin<br />
<br />
<hr />
<br />
# nova list<br />
<br />
<hr />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com1tag:blogger.com,1999:blog-6838440943467636653.post-80104973749441070442014-06-05T21:51:00.003-07:002014-06-13T02:54:04.611-07:00Steps to install OpenStack Icehouse using RDO Packstack on a single node<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
<b>NODE DETAILS</b><br />
<br />
Processor: AMD Phenom II X6 (6 Cores)<br />
RAM: 16 GB DDR3<br />
Hard Drives: 4 x 1TB Seagate Barracuda<br />
Operating System: CentOS 6.5 Minimal<br />
<br />
<hr />
<br />
<b>DISK DETAILS</b><br />
<br />
/dev/sda - root<br />
/dev/sdb - swift<br />
/dev/sdc - cinder<br />
/dev/sdd - cinder<br />
<br />
<hr />
<br />
<b>PREPARE DISK FOR SWIFT</b><br />
<br />
Create /dev/sdb1 partition for the disk marked for Swift<br />
# fdisk /dev/sdb<br />
<br />
Format the partition as ext4<br />
# mkfs.ext4 /dev/sdb1<br />
<br />
<hr />
<br />
<b>NETWORK CONFIGURATION</b><br />
<br />
# vi /etc/sysconfig/network-scripts/ifcfg-eth0<br />
DEVICE=eth0<br />
TYPE=Ethernet<br />
ONBOOT=yes<br />
NM_CONTROLLED=no<br />
BOOTPROTO=none<br />
HWADDR=<MAC-address><br />
IPADDR=<IP-address><br />
NETMASK=<netmask><br />
GATEWAY=<gateway-IP-address><br />
IPV6INIT=no <br />
<br />
<hr />
<br />
<b>SET TIMEZONE AND SYNCHRONIZE TIME</b><br />
<br />
# mv /etc/localtime /etc/localtime.bak<br />
# cp /usr/share/zoneinfo/Asia/Kolkata /etc/localtime<br />
<br />
# yum install ntp<br />
# chkconfig ntpd on<br />
# service ntpd start<br />
<br />
<hr />
<br />
<b>UPDATE CENTOS</b><br />
<br />
yum -y update<br />
<br />
<hr />
<br />
<b>DISABLE SELINUX</b><br />
<br />
# vi /etc/selinux/config<br />
SELINUX=disabled<br />
<br />
# reboot<br />
<br />
<hr />
<br />
<b>CREATE LOGICAL VOLUME GROUP FOR CINDER</b><br />
<br />
Create partitions /dev/sdc1 and /dev/sdd1 on /dev/sdc and /dev/sdd using fdisk<br />
<br />
# fdisk /dev/sdc<br />
# fdisk /dev/sdd<br />
<br />
Create logical volume group using the created partitions<br />
<br />
# yum install lvm2<br />
# pvcreate /dev/sdc1 /dev/sdd1<br />
# vgcreate cinder-volumes /dev/sdc1 /dev/sdd1<br />
<br />
<hr />
<br />
<b>RUN RDO PACKSTACK</b><br />
<br />
# yum install -y http://rdo.fedorapeople.org/rdo-release.rpm<br />
# yum install -y openstack-packstack<br />
# packstack --gen-answer-file my_answers.txt<br />
# vi my_answers.txt<br />
Refer to the attached <a href="https://drive.google.com/file/d/0Bzb0Edagjp8Bazg5bjU1UzdoU2s/edit?usp=sharing">file</a> for details about the answer file configurations. <br />
<br />
# packstack --answer-file=my_answers.txt<br />
<br />
<hr />
<br />
<b>UPDATE NETWORK CONFIGURATION</b><br />
<br />
# vi /etc/sysconfig/network-scripts/ifcfg-br-ex<br />
DEVICE=br-ex<br />
IPADDR=<IP-address><br />
NETMASK=<netmask><br />
GATEWAY=<gateway-IP-address><br />
ONBOOT=yes<br />
STP=off<br />
HOTPLUG=no<br />
NM_CONTROLLED=no<br />
<br />
# vi /etc/sysconfig/network-scripts/ifcfg-eth0<br />
DEVICE=eth0<br />
ONBOOT=yes<br />
HWADDR=<MAC-address><br />
<br />
# ovs-vsctl add-br br-ex<br />
# ovs-vsctl add-port br-ex eth0<br />
<br />
<hr />
<br />
<b>REBOOT MACHINE TO ENABLE ALL CHANGES</b><br />
<br />
# reboot<br />
<br />
<hr />
<br />
<b>ACCESS HORIZON DASHBOARD AT http://<IP-address> </b><br />
<br />
Login details can be found at /root/keystonerc_admin. <br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com7tag:blogger.com,1999:blog-6838440943467636653.post-17126287707574706402014-06-03T21:18:00.003-07:002014-06-07T09:54:48.831-07:00Steps to Setup SVN Server on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
<b>Install SVN Packages</b><br />
<br />
# yum -y install subversion mod_dav_svn <br />
<br />
<hr />
<br />
<b>Create directory for first SVN Repository</b><br />
<br />
# mkdir /svnrepos<br />
# cd /svnrepos<br />
# chown -R apache.apache /svnrepos<br />
# svnadmin create repo1<br />
<br />
<hr />
<br />
<b>Enable Permissions through selinux</b><br />
<br />
# chcon -R -h -t httpd_sys_content_t /svnrepos<br />
<br />
<hr />
<br />
<br />
<b>Modify the SVN Configuration File</b><br />
<br />
# vi /etc/httpd/conf.d/subversion.conf <br />
LoadModule dav_svn_module modules/mod_dav_svn.so<br />
LoadModule authz_svn_module modules/mod_authz_svn.so<br />
<br />
<Location /><br />
DAV svn<br />
SVNParentPath /svnrepos<br />
SVNListParentPath on<br />
AuthType Basic<br />
AuthName "Subversion repositories"<br />
AuthUserFile /etc/svn-auth-users<br />
Require valid-user<br />
</Location><br />
<br />
<hr />
<br />
<br />
<b>Create User for SVN Access</b><br />
<br />
# htpasswd -cm /etc/svn-auth-users svnuser<br />
<br />
<hr />
<br />
<b>Restart Apache Web Server</b><br />
<br />
# service httpd restart <br />
<br />
<hr />
<br />
<b>Open Firewall to allow access to port 80</b><br />
<br />
# iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT<br />
# service iptables save<br />
# service iptables restart<br />
<br />
<hr />
<br />
<b>Access the SVN Repository from the URL</b><br />
<br />
http://<machine-IP>/repo1/<br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-19702381655992968182014-05-29T23:03:00.001-07:002014-06-07T09:55:22.343-07:00Steps to install an FTP Server on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
# yum -y install ftp vsftpd<br />
<br />
# vi /etc/vsftpd/vsftpd.conf<br />
local_enable=YES<br />
chroot_local_user=YES<br />
<br />
# service vsftpd restart<br />
<br />
# chkconfig vsftpd on<br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-69541230918794571942014-05-29T22:59:00.002-07:002014-06-07T09:55:41.309-07:00Steps to disable SELinux on CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
In the file /etc/selinux/config, change the value of the variable SELINUX to disabled<br />
<br />
# vi /etc/selinux/config<br />
SELINUX=disabled <br />
<br />
<hr />
<br />
<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-13902161122717865872014-05-29T22:55:00.002-07:002014-06-07T09:58:39.631-07:00Steps to change hostname in CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
<b>Temporary</b><br />
<br />
# hostname <new-hostname> <br />
<br />
<hr />
<br />
<b>Permanent</b><br />
<br />
In the file /etc/sysconfig/network, change the value of the variable HOSTNAME.<br />
<br />
# vi /etc/sysconfig/network<br />
HOSTNAME=<new-hostname> <br />
<br />
Then, restart the network service.<br />
<br />
# service network restart<br />
<br />
Check if the hostname has changed by running the hostname command:<br />
<br />
# hostname<br />
<br />
If that does not work, try and reboot the machine.<br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-87612098213796785672014-05-29T07:18:00.002-07:002014-06-07T09:58:03.051-07:00Steps to configure Proxy in CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
For yum updates, add the following line to /etc/yum.conf:<br />
<br />
proxy=http://<proxy-server-username>:<proxy-server-password>@<proxy-server-IP>:<proxy-port><br />
<br />
OR<br />
<br />
proxy=http://<proxy-server-IP>:<proxy-port><br />
<br />
<hr />
<br />
For everything else, declare the following environment variables:<br />
<br />
# export http_proxy=http://<proxy-server-username>:<proxy-server-password>@<proxy-server-IP>:<proxy-port><br />
# export https_proxy=http://<proxy-server-username>:<proxy-server-password>@<proxy-server-IP>:<proxy-port><br />
<br />
OR<br />
<br />
# export
http_proxy=http://<proxy-server-IP>:<proxy-port><br />
#
export
https_proxy=http://<proxy-server-IP>:<proxy-port><br />
<br />
<hr />
<br />
For bypassing the proxy server for any IP address, add it to the environment variable no_proxy:<br />
<br />
# export no_proxy="localhost, 127.0.0.1, 10.10.13.178, 10.10.13.196, 10.10.13.198, 10.10.13.199"<br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-68714780483142984012014-05-29T07:06:00.002-07:002014-06-07T09:56:26.122-07:00Steps to become a root user in CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<hr />
<br />
You can user any of the following commands to change to the root user, provided you have the root password:<br />
<br />
# su - root<br />
<br />
OR<br />
<br />
# su root<br />
<br />
OR<br />
<br />
# su -<br />
<br />
OR<br />
<br />
# su<br />
<br />
<hr />
<br />
Easy and dirty way for your user to run commands with root privileges is to add the following line to /etc/sudoers:<br />
<br />
user1 ALL=(ALL) ALL<br />
<br />
You may do this using either visudo command, or by opening the /etc/sudoers file in your favorite text editor. You will of course need to be root.<br />
<br />
# su - root<br />
# visudo<br />
<br />
OR<br />
<br />
# su - root<br />
# vi /etc/sudoers<br />
<br />
<hr />
<br />
You can prefix every command you want to run with root privileges with "sudo". You will be asked for your user's password, and not the root password.<br />
<br />
You can also open a root shell by using the command:<br />
<br />
# sudo -s<br />
<br />
<hr />
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0tag:blogger.com,1999:blog-6838440943467636653.post-30208920921686229512014-05-29T06:54:00.000-07:002014-06-07T09:57:13.146-07:00Steps to enable and disable firewall in CentOS 6<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
You have to be the root to run the following commands.<br />
<div style="text-align: left;">
<br />
<hr />
<div style="text-align: left;">
<br />
<span style="font-family: inherit;"><span style="font-size: small;"><b>Enable Firewall for IPv4:</b></span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<code># service iptables start<br /> # chkconfig iptables on</code></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<hr />
<code> </code> </div>
<div style="text-align: left;">
<span style="font-family: inherit;"><span style="font-size: small;"><b>Disable Firewall for IPv4:</b></span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<code># service iptables save<br /> # service iptables stop<br /> # chkconfig iptables off</code></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<hr />
<div style="text-align: left;">
<br />
<span style="font-family: inherit;"><span style="font-size: small;"><b>Enable Firewall for IPv6:</b></span></span></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<code># service ip6tables start<br /> # chkconfig ip6tables on</code></div>
<code></code><br />
<div style="text-align: left;">
<hr />
<div style="text-align: left;">
<br />
<span style="font-family: inherit;"><span style="font-size: small;"><b>Disable Firewall for IPv6:</b></span></span></div>
<br />
<code># service ip6tables save<br /> # service ip6tables stop<br /> # chkconfig ip6tables off</code><br />
<code></code><br />
<hr />
</div>
</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/11156895119047307400noreply@blogger.com0