Wednesday, May 31, 2017

Openstack - Change admin password - easy way

Hi all,

After long time i am writing this blog. So many things happened in between these days. Again i started to get in touch with OpenStack as a newbie.

It will happen everytime in our setup somebody will change the admin password.

Again we have to install or we have to get into Database, find the user in tables and change the encrypted(hash) password. But its very difficult to do this one. Also it will take more time.

There is shortcut for this (its available in OpenStack tutorial itslef):

1. find the admin_token from the keystone.conf file.

grep admin_token /etc/keystone/keystone.conf

admin_token = xxxxxuxyxyxyxyxyxyxy

then you have to find the URL where your keystone is running. OOPS i dont know where to dont, it simple:

2. just run openstack command in your terminal with debug option:

openstack --debug server list

----
---
----
http://xx.xx.xx.xx/v3/tokens -> you can find the IP where your keystone is running
___
___

3. 35357 which is the port used by keystone for admin

then run the below command it will prompt for new password, where you can enter your new password:

openstack --os-token xxxxxuxyxyxyxyxyxyxy--os-url http://xx.xx.xx.xx:35357/v2.0/ user set --password-prompt admin

Password: yyyyyy
Re-enter new password: yyyyyy

Now, your password is successfully changed.

Keep explore & learning.

Keep Sharing


thanks & regards,
cooldharma06 .. :)

Friday, March 18, 2016

Coreos image for OpenStack

Hi all,

i think its difficult to find the prebuilt Coreos image for OpenStack. So i made it one for OpenStack.
If you want to download the image use the following link:

CoreOS prebuilt Image

Its not spam, its from google drive only.. So you can trust.

Usually by using keys we able to login into the Coreos. I added the username and password for this image to easire access.

Username : coreos
Password : coreos


Note: Only one restriction you have to allocate minimum of HDD - 80GB and ram - 4 GB for your Virtual Machine's.


For the easier purpose i have created one more image which is HDD- 20GB and ram - 2GB. You can find the image in the flowing link.

CoreOS smaller one

Username: cool
Password: cool


thanks & regards,
cooldharma06 .. :)

Friday, November 20, 2015

Opensource Container Initiative- runC installation from Github


Hi all,

After long days i am writing this blog, i think it will be useful for beginner who want to work with containers.

Containers:
      It's a hot topic in todays IT world. I dont want to explain about containers. but these are the examples for containers.

  • Docker
  • rkt
  • runC 

  Docker is provided by the Docker community. rkt is provided by the CoreOs before that they used Docker as their container. And runC is the Open source container which is developed in golang (Go language).

You can find the source of runC in the following link which is available in the Github:

And also you can get lot of information in the github site itself.

runC Installation:

If you want install use runC you have go language in your system.

1. Install go from the binary:
  • Download go language binary in the follwoing link:
                                 or 
            https://golang.org/dl/
  • Runt these command to extract the archive : 
      • tar -C /usr/local -xzf go1.5.1.linux-amd64.tar.gz
  • Copy export PATH=$PATH:/usr/local/go/bin to /etc/profile
      or
  • Copy export PATH=$PATH:/usr/local/go/bin   to /root/.profile
Then run the following command in the terminal:
   $  go version
      go version go1.5.1 linux/amd64

which means go language installed successfully in your system.
Now we have to install runC library from the source. kindly follow the following steps:

2. Install libseccomp-dev from your repository and its done by running the command -
        apt-get install libseccomp-dev
3. Create one folder namely  
  • mkdir runc_gocode
  • export GOPATH=/usr/src/runc_gocode
  • cd runc_gocode/
  • mkdir src
  • cd src
  • mkdir gihub.com/opencontainers
4. You have to download the source for runC from the follwoing github link:
         git clone https://github.com/opencontainers/runc
5. cd runc
6. make
7. sudo make install ( if you are non-root user)
If no error shown means runC is installed successfully in your machine.

Run the following commands to check whether runC is properly installed or not:
$ runc -v
   runc version 0.3


In my next blog i will share you about running containers and creating vm's in runC. If you need more information kindly have a eye on runC github page. Thanks for your time.

References:

Keep explore until you got satisfied.

thanks & regards,
cooldharma06 .. :)

Friday, February 13, 2015

Log Management Tool - Opensource - Logstash + Eucalyptus + kibana

Hi all,

After long time i am writing this blog. It's about log Management.

Refer this blog for more tools: http://www.tuicool.com/articles/B7N3qq

Splunk - proprietary  software

  • one click solution
  • By web portal itself you can load data and folder it will analyse and prepare visuale your logs

Graylog2

  • Good one
  • But process the messages from TCP, UDP and other ports.
  • Using rsyslog to communicate to nodes
  • It will be good for bigger organization

Fluentd:

  • All are like plugins have to add and do the work
  • In_tail is used for reading from text files
  • Everything in json
  • Implemented with c

Logstash
  • Everythings inbuilt
  • It will be good if it combine with Elasticsearch + kibana
  • jruby runs on JVM
  • Autorefresh also we can enable in kibana3
By graylog2 you can read the log from file so we have to move with logstash. And also i am intereseted in Opensource, so i moved forward to the Logstash + Elasticsearch + kibana.

Following are the experiments which i have done:

Source:
  •  Eucalyptus - 3.4.2   ( Eucalyptus version not a problem)
  • Logstash - 1.4.2
  • Elasticsearch - 1.4.2
  • Kibana3

I tested the things for single node. After the successful installation of  Eucalyptus you will get the log under the $EUCA_HOME directory.

Configuration:

In 'elasticsearch.yml' do the following things:
      network.host: IP
      discovery.zen.ping.multicast.enabled: false
      discovery.zen.ping.unicast.hosts: ["hostname" ]
      http.cors.enabled: true
      http.cors.allow: "/.*/"

If you are installing logstash from the deb the configuration files are located under the following directory:
       /etc/logstash/conf.d/*

Logstash will grep the logs based on the configuration files.

Here only we have to pass our configuration files which contains 
       sample.conf
      input {
            ... files location to grep the logs
       }
        filter{
             ... Grok patterns to filter the logs from log file
         }
         output{
                ... redirecting to stdout or to elasticsearch
           } 

Now kibana3 have to be extracte and keep under your /var/www/kibana3/*. So your kibana3 will run under your webbrowser.

To run your elasticsearch in background:
./elasticsearch &

To run your logstash to grep the logs:
./logstash -f /etc/logstash/conf.d/eucalyptus_cloud.conf

then redirect your browser to the http://ip/kibana3 link it will show the visualized pattern of eucalyptus logs.

Based on the search pattern you can grep the logs like ERROR, INFO, cc.log.

It will give the visualization as:



For more guidelines please refer the following links:

Credits to:
https://www.digitalocean.com/community/tutorials/how-to-use-logstash-and-kibana-to-centralize-and-visualize-logs-on-ubuntu-14-04
http://logstash.net/docs/1.4.1/configuration
http://grokconstructor.appspot.com/do/match?example=0
https://www.eucalyptus.com/blog/2013/08/23/extracting-info-euca%E2%80%99s-logs

Regards,
cooldharma06.. :)

.. Always be cool ..


Monday, July 21, 2014

Compile Libvirt for xen (libxl toolstack)

Hi all,

Libvirt is the tools which is used for interacting with hypervisor like XEN, KVM. By using the libvirt, we can pass our configuration in the form of XML format.

And this will be very useful when you are interacting the hypervisor with Web services.

Libvirt is the redhat product and it is giving support for XEN hypervisor also.

Then, How i can compile libvirt for xen.?

 ./configure with --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 --with-xen=yes --with-libvirt=yes

make 

make install 

and its finished.

If you want to check the libvirt in your system; it have the tool as "virsh".

In your command prompt; type virsh -c xen:///

then it will enter into the special terminal. then type: version

virsh # version
Compiled against library: libvirt 1.2.0
Using library: libvirt 1.2.0
Using API: Xen 1.2.0
Running hypervisor: Xen 4.4.0

You will get like this. It means it successfully installed and also able to communicate with your hypervisor also. In my case, hte hypervisor is XEN. And, finally you did it.

Enjoy and Be CooL... :)


regards,
cooldharma06.. :)


Sunday, July 20, 2014

Convert ogv to mkv using ffmpeg

Hi all,

Most of the peoples know about these things just for reminding i am writing this blog. If you are taking video of your Desktop using recordmydesktop ( Screencasting tool) then the output will comes in out.ogv format. If you want to change that one to mkv means kindly follow the following command.

In case if you haven't installed ffmpeg means kindly install from your repository.

ffmpeg -i sample.ogv -vcodec libx264 -vpre medium -crf 24 -threads 0 -acodec copy sample.mkv

Enjoy.. and Be cool..:)

Wednesday, April 30, 2014

Run VLC as a root user.

Hi all,
   
i think you people got bored by trying to "run VLC as a root user". Yeah me too.

After some days i found the solution to run VLC as a root user from some forums.

Solution:

in the following file -> vi /usr/bin/vlc

just change the "geteuid" to "getppid".

Sure it will works. Because its worked for me...:)


Enjoy the world with exploring Things..:)


Regards,
cooldharma06..:)