tag:blogger.com,1999:blog-1084456666451182342024-03-04T21:11:39.092-08:00TunaUnknownhttps://www.blogger.com/profile/09524047222286440650noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-108445666645118234.post-91042016587803216072014-05-14T03:44:00.000-07:002014-05-15T03:44:19.847-07:00[CCNA14] Implementing Docker to CloudStackComing back VN in the end of April, I might be the latest person leaving Denver from CloudStack Collab NA 2014. Just realize it's quite long time from the last entry was posted, today I make another shot about Docker to review some works was done in implementing Docker to CloudStack. Take your time watching <a href="https://www.youtube.com/watch?v=PC6FjpOfK3k">my presentation</a> in CCNA14.<br />
<br />
Take a look on what OpenStack did:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBr5eELvWVudwA-XdCx679LI8Cq4bid5eieLeobaoDokCx0o72jeuHdluABQRRVsvaxJycpb3jxkVEUt9PpWYw94h6VW0hoNRxUnTSR1o6gBsqKun2hoi5O5gAa8_MXt7zi7OvWai7XGkp/s1600/500px-Docker-under-the-hood-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBr5eELvWVudwA-XdCx679LI8Cq4bid5eieLeobaoDokCx0o72jeuHdluABQRRVsvaxJycpb3jxkVEUt9PpWYw94h6VW0hoNRxUnTSR1o6gBsqKun2hoi5O5gAa8_MXt7zi7OvWai7XGkp/s1600/500px-Docker-under-the-hood-2.png" height="192" width="320" /></a></div>
<br />
And what I did for CloudStack:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvIhzrdZMvzGhgnrMgIxXk9BErB3O2mmrB1PR8_ctA4DW9SW-znHfYRFZSnKUEdDDWKDiXPmWVy5cvADOwrTk8kBl17Gj-WgqAFkFxJGx7KzSCfO7Ef9oQAfKkmuD3uZljt4xJeNLEFtTs/s1600/Screen+Shot+2014-05-14+at+15.31.18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvIhzrdZMvzGhgnrMgIxXk9BErB3O2mmrB1PR8_ctA4DW9SW-znHfYRFZSnKUEdDDWKDiXPmWVy5cvADOwrTk8kBl17Gj-WgqAFkFxJGx7KzSCfO7Ef9oQAfKkmuD3uZljt4xJeNLEFtTs/s1600/Screen+Shot+2014-05-14+at+15.31.18.png" height="131" width="320" /></a></div>
<br />
<br />
Well, they looks similar but a bit different. I create Virtual Router container for network orchestration in CloudStack, completely disable network mode in Docker because it will make conflict. This work is still in heavy development, but some items are ready for running now:<br />
<br />
- Provisioning Docker's containers with default network mode.<br />
- Register template (Docker image) from three sources: a Docker image from public repository, a Dockerfile or a Docker tarfile.<br />
<br />
<br />Unknownhttps://www.blogger.com/profile/09524047222286440650noreply@blogger.com0tag:blogger.com,1999:blog-108445666645118234.post-64307403344688699432013-12-22T01:55:00.000-08:002013-12-22T01:55:09.529-08:00Docker in CloudStackLast days on October 2013, Sebastien Goasguen mailed me asking whether I can do integrating Docker to CloudStack. Before, I had nothing about Docker and also very limited knowleadge about LXC. Yeah... just try, because I'm definitely interesting in Computing component in the Cloud system. Lovely period working with Xen and KVM made me feel confident. So... jump off.<br />
<br />
At that time, not too much people in CloudStack community working with Docker, although some guys sometime said oh...great, looking for Docker in CloudStack. So... let me go ahead. In CCCEU 2013 Amsterdam, I had a chance talking with Darren Shepherd, Citrix engineering, he also be interesting in Docker and absolutely more experience than me. Follow by a skype chat with Phong Nguyen, wrote integrating LXC as a first linux container hero in CloudStack, I have good enough experience to make this post to show you what I think to make Docker appear as a second hero in CloudStack's container family.<br />
<br />
Docker, the excellent son of DotCloud, has many wonderful characteristics. You will love to experience Dockerfiles or Docker-Registry. I don't repeatedly describe these features, all information you can find in official site, wiki, documentation, github, etc. What I'm going to talk is how I can use Docker in CloudStack.<br />
<br />
We have two approach ways:<br />
<br />
<ul>
<li>making Docker as a new star of "hypervisor"</li>
<ul>
<li>pros: we can use almost wonderful features of Docker including Dockerfiles and Docker-Registry.</li>
<li>cons: we need to build completely networking and storage strategy for Docker.</li>
</ul>
<li>using Docker instead of Libvirt to provision the exist LXC in CloudStack.</li>
<ul>
<li>pros: just simple remove Libvirt API and add Docker API instead. It's not as complex as the above method.</li>
<li>cons: maybe we can't use such great features of Docker, because we must be depent on the current LXC hypervisor architecture.</li>
</ul>
</ul>
<div>
I prefer the first method. We can either remove LXC hypervisor or maintain both of LXC and Docker. Firstly looking into what OpenStack done with Docker intergration [1].</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1TKsN_kqD1DG1PGgdQ1YWs-85fgBpkkebAjKB41-JmWrECpz7rz5IpcaxiXjSyyjX3MkLzh9t2MzVi5X4Z8_rOkd_aLb6Y7PutwUCQUyw74OhF4khpGSYwWnK574qZy5rMYg7c5lTFaGK/s1600/500px-Docker-under-the-hood.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1TKsN_kqD1DG1PGgdQ1YWs-85fgBpkkebAjKB41-JmWrECpz7rz5IpcaxiXjSyyjX3MkLzh9t2MzVi5X4Z8_rOkd_aLb6Y7PutwUCQUyw74OhF4khpGSYwWnK574qZy5rMYg7c5lTFaGK/s400/500px-Docker-under-the-hood.png" width="400" /></a></div>
</div>
<div>
They said:</div>
<blockquote class="tr_bq">
<div style="background-color: white; color: #333333; font-family: 'Arial Unicode MS', Arial, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px;">
The Nova driver embeds a tiny HTTP client which talks with the Docker internal Rest API through a unix socket. It uses the HTTP API to control containers and fetch information about them.</div>
<div style="background-color: white; color: #333333; font-family: 'Arial Unicode MS', Arial, sans-serif; font-size: 14px; line-height: 20px; margin-bottom: 10px;">
By using an embedded <a class="external text" href="https://github.com/dotcloud/docker-registry" rel="nofollow" style="background-image: url(https://wiki.openstack.org/w/skins/strapping/images/lock-icon.png); background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #0088cc; cursor: pointer; padding-right: 13px; text-decoration: none;">docker-registry</a>, Docker can push and pull images from <a class="external text" href="http://docs.openstack.org/developer/glance/" rel="nofollow" style="background-image: url(https://wiki.openstack.org/w/skins/strapping/images/external-link-ltr-icon.png); background-position: 100% 50%; background-repeat: no-repeat no-repeat; color: #0088cc; cursor: pointer; padding-right: 13px; text-decoration: none;">Glance</a>. The registry usually lives in a container (see the DevStack part below) but it can be deployed outside a container as well.</div>
</blockquote>
Docker engineers wrote a wonderful tutorial for building a private Registry [2] It should be a good choice. That was what OpenStack did also. Of course, we can use Docker public registry.<br />
<br />
For storage, we can build the same with CloudStack Secondary Storage. However with Docker-Registry, we don't need SSVM anymore. For lauching a new instance, Docker pulls image directly from registry. During VM's life cycle, data will be stored in Docker's host.<br />
<br />
For networking, it's a challenge. Docker has its own networking strategy. By default, Docker creates a bridge named Docker0. All containers will be plugged into that bridge and allocated IP address in the same subnet with Docker0. If you try to figure out another bridge, all containers in a Docker's host can be only plugged into that bridge also. In other words, you can't create virtual networks in Docker's host. Luckily, we have some tricks to do. Firstly, Docker has an option to provision container in network-less mode. That is container will be created with only loopback interface [3]. Secondly, Jerome Petazzoni wrote a beautiful script allow containers plugging into pre-defined bridges [4]. It's amazing for us to do provisioning network isolation. So... define some bridges, create network-less containers and plug them into these bridge. That's way. Network services still be done by Virtual Router.<br />
<br />
Provision containers is simple done by Docker APIs.<br />
<br />
[1] https://wiki.openstack.org/wiki/Docker<br />
[2] http://blog.docker.io/2013/07/how-to-use-your-own-registry/<br />
[3] <em style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 22px;">docker run <strong>-n=false</strong></em><span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 22px;"> creates network-less containers</span><br />
[4] https://github.com/jpetazzo/pipeworkUnknownhttps://www.blogger.com/profile/09524047222286440650noreply@blogger.com1tag:blogger.com,1999:blog-108445666645118234.post-22625520130376490542013-12-17T09:43:00.001-08:002013-12-17T09:46:21.183-08:00Running CloudStack MS in Docker<div style="text-align: justify;">
<a href="http://www.docker.io/">Docker</a>, the excellent son of DotCloud, has many wonderful characteristics. One of them is <a href="http://docs.docker.io/en/latest/use/builder/">Dockerfile</a>, which act as a builder and read instructions from a text "Dockerfile" to automate the steps you would otherwise take manually to create an image. After building, you can commit that image to registry for a long use.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
At this post, I would like to show you how to build a Docker image with CloudStack MS pre-installed.</div>
<h2>
Create Dockerfile</h2>
Create an empty file called Dockerfile<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;">touch Dockerfile</pre>
Next, define the parent image we want to use to build the image on top of. We'll use the latest Centos (6.4), which is available on the <a href="https://index.docker.io/">Docker index</a><br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># CloudStack Management Server</span>
<span class="c" style="color: #408090; font-style: italic;">#</span>
<span class="c" style="color: #408090; font-style: italic;"># VERSION 4.2.0</span>
<span class="c" style="color: #408090; font-style: italic;"># Use the Centos base image provided by dotCloud</span>
FROM centos:latest
MAINTAINER Nguyen Anh Tu tuna@apache.org</pre>
Next, we apply any updates:<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># Update</span>
RUN yum update</pre>
After that, we create the CloudStack 4.2 repo:<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># Create ACS 4.2 repo</span>
RUN echo -e "[cloudstack]\nname=cloudstack\nbaseurl=http://cloudstack.apt-get.eu/rhel/4.2/\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/cloudstack.repo</pre>
Turn on NTP for time synchronization<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># Install NTP server</span>
RUN yum install ntp -y</pre>
Then, we start by installing required packages<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># Install CloudStack-Management package</span>
RUN yum install cloudstack-management -y</pre>
This procedure is only required for installations where XenServer is installed on the hypervisor hosts<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># Download vhd-util</span>
RUN wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util
RUN cp vhd-util /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/</pre>
Next, we're going to install mysql-server<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># install mysql-server</span>
RUN yum install mysql-server -y</pre>
We need to insert some configurations to my.cnf file<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># mysql configuration</span>
RUN sed -i 's/.*datadir.*/&\ninnodb_rollback_on_timeout=1\ninnodb_lock_wait_timeout=600\nmax_connections=350\nlog-bin=mysql-bin\nbinlog-format = 'ROW'/' /etc/my.cnf</pre>
Fix missing /etc/sysconfig/network for starting mysql<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># fix missing /etc/sysconfig/network</span>
RUN echo -e "NETWORKING=yes\nHOSTNAME=$(hostname --fqdn)" > /etc/sysconfig/network</pre>
Start or restart MySQL to put the new configuration into effect<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># start mysqld</span>
RUN service mysqld start</pre>
We need to disable SELinux<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># disable SELinux</span>
RUN setenforce permissive</pre>
When running cloudstack-setup-database, it's needed to check SELinux. We'll skip that check to ignore error. (I don't know why that check throws error)<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># comment checkSELinux() line</span>
RUN sed -i "s/checkSELinux()/#checkSELinux()/" /usr/bin/cloudstack-setup-databases
RUN sed -i "s/def #checkSELinux()/def checkSELinux()/" /usr/bin/cloudstack-setup-databases</pre>
So, we can setup cloudstack database at that time. I use no password for mysql root.<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># setup database</span>
RUN cloudstack-setup-databases cloud:@localhost --deploy-as=root: -i $(ip addr list eth0 | grep inet | head -n 1 | awk -F " " '{print $2}' | awk -F "/" '{print $1}')</pre>
<br />
Now that the database is setup, we can finish configuring the Management Server. This below command will setup iptables, sudoers and start the Management Server.<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span class="c" style="color: #408090; font-style: italic;"># setup cloudstack-management</span>
RUN cloudstack-setup-management</pre>
That's it!<br />
<br />
<h2>
Build the Docker image for ACS Management Server</h2>
Running the below command in the directory contained Dockerfile.<br />
<br />
<pre style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 13px; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;">docker build -t <span class="s2" style="color: #4070a0;">"<yourname>/acs-ms"</span> .</pre>
You can find the full Dockerfile <a href="http://people.apache.org/~tuna/Dockerfile">here</a>Unknownhttps://www.blogger.com/profile/09524047222286440650noreply@blogger.com1tag:blogger.com,1999:blog-108445666645118234.post-57466514882391453462013-12-10T06:36:00.000-08:002014-05-15T03:44:50.329-07:00AutoScaling in CloudStack<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
Currently Apache CloudStack supports AutoScaling feature with external Citrix NetScaler device for three purposes: monitoring, grouping and load balancing. For anyone don't know about it, please take a look into Admin guide. Also, there is a pretty explanation below:</div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
<a class="external-link" href="http://support.citrix.com/proddocs/topic/ns-system-10-map/ns-autoscale-how-autoscale-works-con.html" rel="nofollow" style="color: #006daf; outline: none; text-decoration: none;">http://support.citrix.com/proddocs/topic/ns-system-10-map/ns-autoscale-how-autoscale-works-con.html</a></div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
Starting from a motivation about creating a native solution of AutoScaling feature, I made some changes to reproduce NetScaler engine operation. The first version still keeps the similar steps compared with the current NetScaler version, while adding two new native counters (Linux User CPU - native & Linux User Memory - native). You can find more detail from my presentation here:</div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
<a class="external-link" href="http://www.slideshare.net/tuna20073882/autoscale-without-netscalerccceu13" rel="nofollow" style="color: #006daf; outline: none; text-decoration: none;">http://www.slideshare.net/tuna20073882/autoscale-without-netscalerccceu13</a></div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
<a class="external-link" href="http://www.youtube.com/watch?v=LJnKMuADvHc" rel="nofollow" style="color: #006daf; outline: none; text-decoration: none;">http://www.youtube.com/watch?v=LJnKMuADvHc</a></div>
<div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
Chiradeep, CloudStack PMC, has a vision to improve my hacking with some new changes below:</div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
<span style="color: #222222;"> + Need to remove Load Balancing feature from AutoScaling. That’s very easy to do.</span><br />
<span style="color: #222222;"> + Need to use SNMP for monitoring not only instance-level but also application-level.</span><br />
<span style="color: #222222;"> + Also, supporting well KVM hypervisor</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-NxSKqjDzYcG9vCJRnN3WrdHsfaZGKtE2WwWYuQ9gkjQThyphenhyphengBT1EQ9NRSTlr7St2RZ_l20Zu4uzvIXUOT9CQL_p9ncHP7zpoYWvfgHkCwOlcOmpk3qZObeiyL32GIQOI9_Wthh0WZUZ5s/s1600/Slide2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-NxSKqjDzYcG9vCJRnN3WrdHsfaZGKtE2WwWYuQ9gkjQThyphenhyphengBT1EQ9NRSTlr7St2RZ_l20Zu4uzvIXUOT9CQL_p9ncHP7zpoYWvfgHkCwOlcOmpk3qZObeiyL32GIQOI9_Wthh0WZUZ5s/s640/Slide2.jpg" height="480" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="background-color: white; background-image: none; color: #333333; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
The idea is that the monitoring (WHAT to monitor and HOW to monitor) is separate from the autoscaling decision.</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
The autoscaling decision should be a pure mathematical decision. </div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
The various services can interact via Java API(s). In this case the deployment is simple (within the CS management server).</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
However, the monitoring service likely needs more scale than regular CloudStack orchestration. Ideally there should be the option of running the monitoring service outside of the CS MS.</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
Responsibilities:</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
Monitoring service:</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
- monitor counters in VMs/hypervisors/network appliances</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
- provide aggregates and threshold crossing outputs</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
- communicates threshold crossing info to autoscale service</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
Auto Scale Service</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
- decides to scale based on policy and threshold crossing info from monitoring service</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
- communicates with CS MS to perform scale-up/scale-down</div>
<div style="background-image: none; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
It should be a great idea, so I made a closer look to AutoScale service and Monitoring service.</div>
<div style="font-family: Helvetica; font-size: 12px; line-height: normal;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEtGSAeChvKo3wJ1qtATlnVjHrDTBAxrMEUH3-_hCby5fJf8cxpiCcQEhOyrr1GBcdx4Qh72Lq4P9qkVLDqlJ082MCqTAJZXIEW3Z6qu5rzrSJBbs8kqS6zJWoFcKyVme15tz67GzIPi-W/s1600/interface2_autoscaling.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEtGSAeChvKo3wJ1qtATlnVjHrDTBAxrMEUH3-_hCby5fJf8cxpiCcQEhOyrr1GBcdx4Qh72Lq4P9qkVLDqlJ082MCqTAJZXIEW3Z6qu5rzrSJBbs8kqS6zJWoFcKyVme15tz67GzIPi-W/s1600/interface2_autoscaling.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">AutoScaling service</span></td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7oeqk-u-kvTI__NqfvCqz5n_AEKblphJ4Ld7wAdOdC6EOu9iKpK3mI7ykWZXJFVp_7wZn4aQOdF_VSFKcVcDiHlxsWIfOm3I9qIlfGHK5hj-3pzeT3S0hIGMf2HYfBfdvvUv-u0QJ2NFp/s1600/inteface_autoscaling.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7oeqk-u-kvTI__NqfvCqz5n_AEKblphJ4Ld7wAdOdC6EOu9iKpK3mI7ykWZXJFVp_7wZn4aQOdF_VSFKcVcDiHlxsWIfOm3I9qIlfGHK5hj-3pzeT3S0hIGMf2HYfBfdvvUv-u0QJ2NFp/s1600/inteface_autoscaling.png" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-size: small;">Monitoring service</span><br />
<div style="text-align: center;">
<span style="color: #333333; line-height: 17px; text-align: left;"><br /></span></div>
<div style="text-align: center;">
<br /></div>
</td></tr>
</tbody></table>
Hope I can finish improving it before the next conference at Japan, March 2014.</div>
</div>
Unknownhttps://www.blogger.com/profile/09524047222286440650noreply@blogger.com1