레이블이 Ubuntu인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Ubuntu인 게시물을 표시합니다. 모든 게시물 표시

2012년 8월 26일 일요일

Ubuntu Korean community meeting (August, 2012)

I've been involving Linux world since September, 2011. It's been a year. I started with Redhat and CentOS. Two were Linux OSes which at least familiar with for me and time was passed.


As time goes by, I had to examine new technologies, Openstack for example. I am not intending to blame Redhat and CentOS, those are fantastic systems. However, It was true that deploying, testing is hard working on those OSes for the new technology. In the middle of trying and fail, I realized the existence of Ubuntu.

I've joined in some open communities. Ubuntu Korean community is one of them and I had a monthly periodical meeting yesterday. The post is to review this.


There were the following Agenda of the meeting.
1. To survive as a software engineer in IT era.
2. How to use KDE and its benefits.
3. Introducing commandline utilities
4. CUBRID (Open Database)


1. To survive as a software engineer in IT era.

  • Having fun for development: Development is hard working, Become curious -> Learning, Studying
  • Sharing, Responsive: Sharing your knowledge, Communications and Improving.
  • Change: prefered technology is changeable. Knows trends.            
2. How to use KDE and its benefits
  • KUbuntu (KDE on Ubuntu) and some useful programs: Kate (editor), Dolphine (file manager), Konqueror (file manager), KRunner (search), etc.
3. Introducing command-line utilities

  • Command line interface Advanced users
  • eBuntu is Operating System for embedded system.
  • Utilties in Command line: mocp / mpg321 / mplayer (Multimedia), w3m / ircii / irssi / rtorrent (Internet)
4. CUBRID

Cubrid is totally open license (GPL), They don't have commercial license. but Customer have to pay for technical support.
- DB engine: GPL
- UI: BSD
- Technical Support: Payable

MySQL history        
1994    MySQL development
1999    Became Open source
2008    Merger to Sun ($10B)
2010    Merger to Oracle
2011   Ship 5.5 & Change license policy

Current MySQL status
- Alternatives: MariaDB, PostgreSQL

Cubrid Global
- Upload source code to SourceForge(http://sourceforge.net/projects/cubrid)
- Cubrid.org (http://www.cubrid.org)

Performance, Scalability, Usability, Availability, Reliability
- Performance - Higher Read speed by using caching
- HA: HA with replication (Shared nothing)
- Shading: Similar with NoSQL
- Usability: Manager for DBAs, Query brower for developers, Web manager, Migration toolkit (Oracle, Mysql)

Q&A
- Has nearly same SQL syntax with MySQL (90%)
- Seminar per year (on September)
- Facebook page: http://www.facebook.com/cubrid 



2012년 3월 26일 월요일

Openstack: 1. XCP install & configuration

To test openstack compute (Nova) with xen based machine, it needs XCP (Xen Cloud  Planform) or Xenserver. Openstack compute supports KVM, XenServer/XCP and ESXi hypervisor. I chose XCP because it needs no license. 


XCP is open source version of XenServer which has the same toolstack with XerServer. As a Cronos project, it is able to use XCP on Ubuntu 12.04 called Precise. (For Fedora and Centos users, they should wait until May. XCP team is porting xen on Fedora and CentOS, It will be finished by May)


I prepared the following servers for the test.
- 1 Virtual Machine: Openstack compute, installed Ubuntu.
- 1 Physical Machine : Openstack Controller, Ubuntu 12.04 beta (XCP 1.5 beta)




When creating virtual machine on XCP, it has to create a storage repository first. XCP uses SR (Storage Repository) to store virtual machine images, ISO files and templates. SR supports for IDE, SATA, SCSI and SAS drives locally connected, and iSCSI, NFS, SAS and Fibre Channel remotely connected.  


I have known storage repository concept since Oracle VM. I used NFS as a shared resository. NFS also can be used in XCP. However, I only have one physical machine this time. There are two physical hard disks on the server. One is for operating system and the other is for storage of XCP.     


Set the environment of XCP 
As a result of Cronos project, it is able to install xcp using agt-get command on Ubuntu 12.04.

1) Set up software repositories
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ubuntu-xen-org/xcp-unstable

2) Workaround xcp-networkd missing file
$ mkdir /etc/xcp
$ echo "bridge" >> /etc/xcp/network.conf

3) Install xapi: This step installs XCP's xapi and all its dependencies, including the Xen hypervisor.
$ apt-get pciutils
$ apt-get update
$ apt-get install xcp-xapi
$ apt-get install xcp-xe

4) Workaround VM's not going to power-state: halted after shutdown
$ vi /usr/lib/xcp/scripts/vif

remove)    =>   remove|offline)
    if [ "${TYPE}" = "vif" ] ;then
        call_hook_script $DOMID "${ACTION}"
        # Unclear whether this is necessary, since netback also does it:
        logger -t script-vif "${dev}: removing ${HOTPLUG_STATUS}"
        xenstore-rm "${HOTPLUG_STATUS}"

5) Workaround XAPI conflicts with XEND
$ sudo sed -i -e 's/xend_start$/#xend_start/' -e 's/xend_stop$/#xend_stop/' /etc/init.d/xend
$ sudo update-rc.d xendomains disable

6) Workaround qemu keymap location preventing vncterm from starting
$ sudo mkdir /usr/share/qemu
$ sudo ln -s /usr/share/qemu-linaro/keymaps /usr/share/qemu/keymaps

7) 
Make xen the default grub entry.
$ sed -i 's/GRUB_DEFAULT=.\+/GRUB_DEFAULT="Xen 4.1-amd64"/' /etc/default/grub
$ update-grub

Create local storage repository
If you want to create a VM before create a SR, you meet the following error: 
Error: No SR specified and Pool default SR is null


So, I make a partition to map storage repository 
$ pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created


$ pvdisplay
----- Physical volmue -------
 PV Name               /dev/sda2
 VG Name               VolGroup00
 PV Size                 11.72 GB / not usable 1.68 MB
 Allocatable            yes (but full)
 PE Size (KByte)      32768
 Total PE                375
 Free PE                 0
 Allocated PE          375
 PV UUID                AN--------------

----- Physical volmue -------
 PV Name               /dev/sda3
 VG Name               VolGroup00
 PV Size                 8.17 GB / not usable 17.80 MB
 Allocatable            yes (but full)
 PE Size (KByte)      32768
 Total PE                261
 Free PE                 261
 Allocated PE          0
 PV UUID                Tj--------------


$ xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3320620AS_5QF7QZZL name-label=”local storage”
After run this command, an error was occurred.
The SR could not be connected because the driver was not recognised.
driver: lvm
Set EXT if you have an unused block device. I got an idea of how to solve from here


Tried again after changed type from lvm to ext 
$ xe sr-create type=ext content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3320620AS_5QF7QZZL name-label=”local storage”


# Create a vm
$ net_uuid=$(xe network-list bridge=xenbr0 --minimal)
$ vm=$(xe vm-install new-name-label="centos-test" template="CentOS 5 (64-bit)" sr-name-label="local stroage")

$ xe vif-create vm-uuid=$vm network-uuid=$net_uuid mac=random device=0
$ xe vm-param-set uuid=$vm other-config:install-repository=http://ftp.daum.net/centos/5/os/x86_64
$ xe vm-param-set uuid=$vm other-config:disable_pv_vnc=1
$ xe vm-start uuid=$vm


# Connecting to xenconsole
$ dom_id=$(xe vm-list uuid=$vm params=dom-id --minimal)
$ /usr/lib/xen-4.1/bin/xenconsole ${dom_id}


Type ctrl + ] if you want to close xencosole


References: 
1. XCP toolstack on a Debian: http://wiki.xen.org/wiki/XCP_toolstack_on_a_Debian-based_distribution 
2. Hypervisor support matrix: http://wiki.openstack.org/HypervisorSupportMatrix 
3. CentOS 6 VM (64 bit) automated installation on XCP: http://grantmcwilliams.com/item/563-centos6-on-xcp

2012년 1월 27일 금요일

Android-x86 ICS on QEMU

After several trials and errors, I finally set up Ubuntu 10.4 and KVM for porting Android-x86 Ice cream-sandwich (ICS). ( I did setup CentOS before and it turned out that it wasn't a good decision for this. I was not able to resolve dependencies between RPM. )


My intention was to get the latest version of android, android-x86-4.0-generic.iso  from the web site. But that iso file was not provided. Although I downloaded android-x86-4.0-eeepc.iso instead and installed it, it failed during setup. 


Therefore, I decided that I got its source and compiled it to install android-x86 for my QEMU virtual machine. 


Before this, it needed to prepare build environment. Please check this web site.


# Installing Repository
$ mkdir ~/bin
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo


# Getting source code
$ mkdir ~/android-x86
$ cd ~/android-x86
$ ~/bin/repo init -u http://git.android-x86.org/manifest -b ics-x86
$ ~/bin/repo sync


# Compiling source
$ make iso_img TARGET_PRODUCT=generic_x86


After I successfully made the iso file, the following procedure was to setup it.
This was my screen-shots.


If you see black screen during booting after install, you have to change to vga model.


There were still some problems for further test.
1) ICS has not yet supported Ethernet configuration GUI, this enables LAN network interface. I couldn't configure a proper network. Earlier version, Gingerbread for example, it was provided.
2) SD card can't expand more than 2GB.

Reference sites: 
1. http://www.android-x86.org/documents/customizekernel
2. http://source.android.com/source/

2012년 1월 22일 일요일

Do not use CentOS for test the newest tings.

Recently, I was trying to deploy Android-x86 to a guest machine of Xen hypervisor. I installed CentOS 6.2. Xen is not the default hypervisor for CentOS 6.2. Instead, They have set KVM as the default. Therefore, I needed to download and install Xen ( I chose xen 4.1) 


Here, I'm not telling how to Xen on CentOS, but I'd like to say that I realized it was totally useless thing. I strongly recommend to use Ubuntu because It supports well about newest versions of technologies. (If you really like RHEL, you at least should use Fedora Linux.) 


I did in a way of compiling Fedora's RPM package sources. I discovered the problem that it was VERY DIFFICULT  to meet dependency requirements each sub-packages. After I succeeded one package and it was obvious to get some error on the next package.


Though I installed EPEL (Extra Packages for Enterprise Linux), I gave up install things on CentOS and finally changed to Ubuntu.


To summarize, 
1) Use Ubuntu for the test newest version of products or technology
2) Don't try compile RPM sources. you could see dependency hell. If possible, get the source of the program (*.tarball and so on)
3) Use Fedora instead, if you really like RHEL.

The bellow was the working log on CentOS.
----------------------------------------------------------------------------