What Andres Rodriguez talks about

Posts tagged with 'ubuntu'

Note: The car is what we call a Combi in Peru, which is a form of public transportation. While I didn’t create the FF7 original pic, it is mock to peruvian combi drivers because those are one of the most reckless drivers in the world.

For a while, I have been wanting to write about MAAS and how it can easily deploy workloads (specially OpenStack) with Juju, and the time has finally come. This will be the first of a series of posts where I’ll provide an Overview of how to quickly get started with MAAS and Juju.

What is MAAS?

I think that MAAS does not require introduction, but if people really need to know, this awesome video will provide a far better explanation than the one I can give in this blog post.

MAAS have been designed in such a way that it can be deployed in different architectures and network environments. MAAS can be deployed as both, a Single-Node or Multi-Node Architecture. This allows MAAS to be a scalable deployment system to meet your needs. It has two basic components, the MAAS Region Controller and the MAAS Cluster Controller.

Region Controller

The MAAS Region Controller is the component the users interface with, and is the one that controls the Cluster Controllers. It is the place of the WebUI and API. The Region Controller is also the place for the MAAS meta-data server for cloud-init, as well as the place where the DNS server runs. The region controller also configures a rsyslogd server to log the installation process, as well as a proxy (squid-deb-proxy) that is used to cache the debian packages. The preseeds used for the different stages of the process are also being stored here.

Cluster Controller

The MAAS Cluster Controller only interfaces with the Region controller and is the one in charge of provisioning in general. The Cluster Controller is the place the TFTP and DHCP server(s) are located. This is the place where both the PXE files and ephemeral images are being stored. It is also the Cluster Controller’s job to power on/off the managed nodes (if configured).

The Architecture

As you can see in the image above, MAAS can be deployed in both a single node or multi-node. The way MAAS has being designed makes MAAS highly scalable allowing to add more Cluster Controllers that will manage a different pool of machines. A single-node scenario can become in a multi-node scenario by simply adding more Cluster Controllers. Each Cluster Controller has to register with the Region Controller, and each can be configured to manage a different Network. The way has this is intended to work is that each Cluster Controller will manage a different pool of machines in different networks (for provisioning), allowing MAAS to manage hundreds of machines. This is completely transparent to users because MAAS makes the machines available to them as a single pool of machines, which can all be used for deploying/orchestrating your services with juju.

How Does It Work?

MAAS has 3 basic stages. These are Enlistment, Commissioning and Deployment which are explained below:

Enlistment

The enlistment process is the process on which a new machine is registered to MAAS. When a new machine is started, it will obtain an IP address and PXE boot from the MAAS Cluster Controller. The PXE boot process will instruct the machine to load an ephemeral image that will run and perform an initial discovery process (via a preseed fed to cloud-init). This discovery process will obtain basic information such as network interfaces, MAC addresses and the machine’s architecture. Once this information is gathered, a request to register the machine is made to the MAAS Region Controller. Once this happens, the machine will appear in MAAS with a Declared state.

Commissioning

The commissioning process is the process where MAAS collects hardware information, such as the number of CPU cores, RAM memory, disk size, etc, which can be later used as constraints. Once the machine has been enlisted (Declared State), the machine must be accepted into the MAAS in order for the commissioning processes to begin and for it to be ready for deployment. For example, in the WebUI, an “Accept & Commission” button will be present. Once the machine gets accepted into MAAS, the machine will PXE boot from the MAAS Cluster Controller and will be instructed to run the same ephemeral image (again). This time, however, the commissioning process will be instructed to gather more information about the machine, which will be sent back to the MAAS region controller (via cloud-init from MAAS meta-data server). Once this process has finished, the machine information will be updated it will change to Ready state. This status means that the machine is ready for deployment.

Deployment

Once the machines are in Ready state, they can be used for deployment. Deployment can happen with both juju or the maas-cli (or even the WebUI). The maas-cli will only allow you to install Ubuntu on the machine, while juju will not only allow you to deploy Ubuntu on them, but will allow you to orchestrate services. When a machine has been deployed, its state will change to Allocated to <user>. This state means that the machine is in use by the user who requested its deployment.

Releasing Machines

Once a user doesn’t need the machine anymore, it can be released and its status will change from Allocated to <user> back to Ready. This means that the machine will be turned off and will be made available for later use.

But… How do Machines Turn On/Off?

Now, you might be wondering how are the machines being turned on/off or who is the one in charge of that. MAAS can manage power devices, such as IPMI/iLO, Sentry Switch CDU’s, or even virsh. By default, we expect that all the machines being controlled by MAAS have IPMI/iLO cards. So if your machines do, MAAS will attempt to auto-detect and auto-configure your IPMI/iLO cards during the Enlistment and Commissioning processes. Once the machines are Accepted into MAAS (after enlistment) they will be turned on automatically and they will be Commissioned (that is if IPMI was discovered and configured correctly)..This also means that every time a machine is being deployed, they will be turned on automatically.

Note that MAAS not only handles physical machines, it can also handle Virtual Machines, hence the virsh power management type. However, you will have to manually configure the details in order for MAAS to manage these virtual machines and turn them on/off automatically.

RoAkSoAx suggested to remote the item from the Agenda until replacement is found.

==== Weekly Updates & Questions from the Ubuntu Community ====

kim0: Will be running a weekly community IRC meeting for the Ensemble team. This will be run in #ubuntu-cloud starting tomorrow at 6pm-UTC, it will be merged with the older community meeting. Everyone attending this meeting is a good candidate to attend tomorrow’s

That meeting will provide a high level overview of development in the Ensemble world since last meeting/week.

Writing an announcement on http://cloud.ubuntu.com/ right now, which I’ll mirror on planet, and everyone is encouraged to spread/tweet…etc

Don’t worry, I don’t have the sickness nor I desire it to anyone (Knock on wood). This post represents my thoughts on the recent presidential elections held in Peru. I’m not gonna go into much detail but rather give a brief overview of how I see things in my country. Also, I apologize if the reference to the sicknesses offends someone, as I’m just really trying to represent what great amount of people in my country think. (Not only me, but my family, friends, the young and the old, and even the press)

Yesterday Sunday, presidential elections were held. 5 were the candidates, 3 of which were the most popular. Unfortunately, only two of them go to a second stage on which the president will be elected. These are, Keiko Fujimori (Cancer) and Ollanta Humala (AIDS).

Keiko Fujimori, daughter of Alberto Fujimori, former president of Peru between 1990 and 2000 (after two consecutive periods) and 2001 (third period). Keiko Fujimori, very well educated person, having studied in the US. His father, the worst kind of man in the world. During this presidency, he stole millions and millions of dollars. He was supposed to only server two consecutive periods according to laws, however, his desire for power was greater that he tricked the elections and won a third time. After this, videos of his advisor Vladimiro Montesinos bribing congress man/business man/etc appeared on TV. The advisor, decided to scape the country, and with him Alberto Fujimori. He created a show trying to look after Vladimiro, however, it was just a distraction to help him scape (or so is presumed). Then, months later (if I recall correctly), he went to Japan for a presidential visit. However, once he arrived there, he declared himself as Japanese citizen and resigned to the presidency. Years later he tried to came back to Peru through Chile, but he was caught and now he is serving his sentence in jail for all the crimes he committed. It is presumed that along with his advisor, they stole millions of dollars from Peru, bribed people, controlled newspapers and all that sort of stuff. He managed to hide (or destroy) most of the evidence they got against him, but he left his advisor hanging. Anyways, during his first few years as a president, he didn’t do all bad things though. He pretty much eliminated terrorism and pulled Peru up economically, from a sinking ship. Peru was submerged in inflation. His daughter, however, doesn’t have anything to offer to the country. She got where she is thanks to the popularity of her father. Vote percentage (~26%)

Ollanta Humala, on the other hand, very badly educated (from my point of view). Retired commander from the Peruvian Army. Very well educated father, and murderer brother. Puppet of Hugo Chavez. Well, there’s not really much to say about him rather than he is just incompetent. His brother (and presumably him) organized a a take over of a small town in the Peru mountains leader-ed by the brother (Ollanta of course always said he wasn’t involved). They killed cops. His brother is currently in jail and he has admitted that his brother was involved (I presume after left abandoned by him to rotten in Jail). In the northern part of the country, Indians from the jungle started a quarrel with the current government, taking roads and killing lots of cops. It was proven with videos and intelligence report that this was all organized by Ollanta and his puppets. Anyways, with help of Hugo Chavez, he has been trying to buy the country. In poor places, he has created organizations financed by Chavez, to “feed” (or should I say recruit) people to join the cause. Anyways, he has proven himself uneducated in the debates and an idiot in various aspects of the current situation of Peru in general. However, this didn’t prevent him from being the highest voted in Peru (~30%).

So anyways, Ollanta wants to renegotiate all the international treaties. He wants to change the constitution. He wants to give the wealth of the country to the poorest (and obviously take it from the richest’s and middle class). He wants to do what Chavez and Evo (president of Bolivia) did to their countries. He wants to rule all his life in a dictatorship rather than a democracy. Economically, he is gonna f**** the country up for his own interests. Which ones? Power, Money, you know. On the other side, Fujimori, is gonna probably follow his daddy’s saying. Yeah, she is just a face behind the master mind.

30% of the country was ignorant enough to chose for Ollanta. Yes only the poor, who were maliciously tricked, voted for Ollanta. Now, around 30% of the Peruvian population is considered to be poor. From that percentage, almost all voted for Ollanta (from my point of view). 26% of the population voted for Fujimori. The rest, around 56% voted for other candidates, mainly 3, who weren’t intelligent enough to join forces against a common enemy (again, they all went towards their own personal interests rather than the country’s sake). Unfortunately for us, everybody that decided to vote against the worse, voted for 3 of the candidates and that wasn’t enough to beat the enemy.

So you may wonder, why has this happened. In short and as I mentioned above, it is a combination of lack of judgment and education. Yes, Peru is a country on which education is not a priority. (State universities, schools, etc etc, simply suck). So candidates took advantage of the lack of education to get votes. Unfortunately for us, there were so many candidates that the worst ended up having the most votes. If I recall correctly, Peru is a country that has 85% of the biodiversity of the world. We have gold, natural gas, silver, and other minerals. We are so rich in many stuff, but yet, so poor in education and judgment. Congressman, Presidents, etc, they only worry about their own pockets and people is just so ignorant that they keep voting for them. People don’t vote objectively, they just vote because of the fancy things presidents say. Ignorants, voted for the ignorants. Fujimorists, voted for Fujimori. The rest, voted for the better, unfortunately, the better wasn’t united.

To conclude, Peru is now in the hands of us the voters to decide for the better. Not the best, the better. I just hope people see the way I see it. Unfortunately, we are between Cancer and AIDS. I believe if Fujimori ends up as a president, we have some hope, but if not, we are doomed. People is scared of getting the Fujimori clan into the government again, but most of us are even more scared of having Ollanta changing the country Chavez’ like!

For all of those who don’t know, “PowerNap is a screen saver for servers except it doesn’t save your screen, it saves the environment and lowers your energy bill.” Dustin Kirkland :). PowerNap was originally created by Dustin to be integrated with (UEC), but it has been extended for Home use. Originally, it put to sleep machines (suspend, hibernate, poweroff) when a list of Processes were not found in the process table for a determined period of time. However, during the Natty cycle improvements were made. So, PowerNap now puts to sleep (suspend, poweroff, powersave) machines that are tagged as underutilized by a set if Monitors.

Improvements Overview

PowerNap, has a set of Monitors to be able to detect activity within the server and determine if it is idled or not. If it is, PowerNap will execute an ACTION. Administrators can chose what monitors to enable/disable. These are:

The process starts when PowerNap begins monitoring for an ABSENT_PERIOD (i.e. 300secs). If within that period no activity has been detected, then PowerNap executes an ACTION.

Before the ACTION is taken, PowerNap enters to the GRACE_PERIOD (I.e 30 seconds), notifying the user that the ACTION will be taken in GRACE_PERIOD amount of seconds. (i.e. On second 270 PowerNap will notifies its users and the period between 270 and 300 seconds is known as GRACE_PERIOD).

The possible ACTIONS are:

Best-effort – Automatically decide between a user defined action or any of the other methods listed below (these methods rely on pm-utils)

The PowerSave method executes a set of scripts both provided by pm-utils and PowerNap. These scripts have the objective to reduce the power consumption of the machine by turning off hardware capabilities or tuning the OS. It is possible to provide any custom script as well as chose which to enable or disable. Examples of these scripts are:

Turn off all the CPU cores except of one.

Reduce the cores frequency to the lowest possible.

Disable WoL from Network Cards.

Change the NIC speed from 1Gbps to 100Mbps.

Turn off USB ports.

Disable HAL polling.

Now, when the PowerSave ACTION is taken, the machine keeps running in a lower power state. PowerNap keeps Monitoring until activity is detected. Once any of the Monitors detects activity, the PowerSave action is reverted.

PowerWake

PowerWake is simply a tool that sends WoL packets to an specified IP/Broadcast address to be able to wakeup a server.

Additional Tools

powernap-now: Sends a signal to the PowerNap daemon to execute the ACTION regardless of the state of the monitors.

powerwake-now: Sends a signal to the PowerNap daemon to wakeup during the PowerSave mode.

Note that these commands have to be executed in the machine running PowerNap. If this needs to be done through the network, then the command will have to be sent remotely to be executed in the machine.

The Future

Second Stage Action: Second Stage Action when entered into PowerSave mode. (i.e. Suspend after 2 hours after running in PowerSave mode).

Client/Server Model: The main Idea is to create a powerwaked Server that tracks all the machines using PowerNap in the network and is able to schedule wakeups, upstates, etc, etc.

Currently, I connect my laptop to a 22-inch TV. I do this using HDMI. But, I’m now planning to get two 22-inch LCD monitors. However, I was wondering how can I connect the two external monitors to my laptop to independent screens.

I was reading online that getting a DualHead2Go device would be one of the options (regardless of its resolution restrictions). Does anyone have one of this??

Or, Does anyone know of a USB to VGA (or HDMI) adapter that works out of the box in Ubuntu, and provides a decent resolution for 22 inch LCD’s?

UPDATE: Today, I decided to make a little test with my laptop in the attempt to connect two external monitors to it. (HP dv4t with an nVidia GeForce G 105M). What I simply did is:

First, I connected an external monitor through VGA. I enabled it and disabled the laptop LCD.
Second, I connected a second external monitor through HDMI. The monitor was recognized, I enabled, and it was supposedly enabled. However, there was no video output. The reason is because it was HDMI and I was using the Nouveau driver due to the X breakage in Natty.

So, wondering if this would actually work I decided to try the same in Windows. And you know what? It worked! I didn’t test it throughly though. I just connected two external monitors, one to VGA and one to HDMI (and of course turned of my LCD screen). So, whenever the nVidia/X fix is available in Natty I’ll try the same configuration. I’m pretty sure it will work.

I’m now wondering if this would work with any other computer using Intel video cards?

My plans to work over the holidays were affected because I ended up not having my laptop available. Fortunately for me I got it back few days ago, which means I can now get back to do the Ubuntu related stuff I wanted to do (TestDrive, PowerNap, Update the Cluster Stack to the latest).

However, after getting my laptop back, I dropped my Nexus One into the water…(yeah boomer). Fortunately, it was turned off. I removed the battery, Memory Card, SIM Card, and dry it as fast as I could… I haven’t turned it up yet since I’m waiting for it to dry completely; but, to help with that, I put it into a bowl with rice. It is sitting there for the last couple of days, since rice is supposed to absorb moisture and humidity. Hopefully it works again!

UPDATE: After leaving my N1 to dry for a couple of days in rice, I decided to give it a try today and see if it works… and IT DOES!! Nothing seems to be malfunctioning… I guess I was just lucky then!!

Anyway, good thing is that I had an old phone so I’m not totally incommunicated (Just no twitting, facebook, irc from the phone when I’m not at home… I guess I’ll prolly be suffering from the abstinence syndrome…or not ).

So, today I tried to connect my laptop to the TV using HDMI. Surprisingly, it does not work correctly. The image in the TV comes for a couple of seconds and then goes again for a few more seconds, and the process repeats. Any ideas of what might be going wrong? (It is not cable cause it works well with Windows). So, I’m guessing it is either the Nvidia graphics driver or some configuration error.

My graphics card is an NVidia Geforce G 105M.

UPDATE: So, a user post a comment here that might be related to the audio output and indeed. Now, the HDMI output works, I can see my screen from the tv, the only issue is that there’s no Audio.

How was it fixed? I Went to System > Preferences > Sound, and in Profile I selected “Digital Stereo (HDMI) Output” instead of “Analog Stereo Output”. This, however, shows me the screen but there’s no audio from the TV nor from the Laptop Speakers.

UPDATE 2: Well after trying to figure out what is going wrong with this, I finally was able to get sound out of my TV connected to the computer through HDMI. For this I had to unmute a setting using alsamixer. This setting was S/SPDIF 1. So, now I have both, picture and sound coming out of my TV. However, the picture comes *only* when there’s something using the sound cards. i.e.When music player is on. When music is off, the TV screen will be turning off/on constantly, as described above.