Skip to content

More Mind Spew-age from Harold Spencer Jr.

Random Information – sometimes techie, sometimes not..

Menu

  • About The Author
  • Interests
  • Private Cloud Computing
  • Infrastructure
  • System Adminstration
  • Private Cloud Computing

RSS All Things Distributed – Werner Vogels

  • From Schooling to Space: Eight Predictions on How Technology Will Continue to Change Our Lives in the Coming Year
  • Strengthening our commitment to Australia
  • How the Seahawks are using a data lake to improve their game
  • Understanding Climate Change Using High Performance Computing and Machine Learning
  • Grüezi Schwiiz! Bonjour la Suisse! Buongiorno Svizzera! An AWS Region comes to Switzerland

RSS Elastician – Mitch Garnaat

  • Back To The Future
  • Looking at Clouds from Both Sides Now
  • Don't reboot me, bro!
  • Mapping Requests to EC2 API Versions
  • Python and AWS Cookbook Available

RSS Amazon Web Services Blog

  • Amazon Lex Introduces an Enhanced Console Experience and New V2 APIs
  • New – AWS Transfer Family support for Amazon Elastic File System
  • Amazon Location – Add Maps and Location Awareness to Your Applications
  • New –  FreeRTOS Long Term Support to Provide Years of Feature Stability
  • Announcing AWS IoT Greengrass 2.0 – With an Open Source Edge Runtime and New Developer Capabilities

RSS Amazon Web Services Security Blog

  • AWS is the first global cloud service provider to comply with the new K-ISMS-P standard
  • Best practices and advanced patterns for Lambda code signing
  • How to approach threat modeling
  • Masking field values with Amazon Elasticsearch Service
  • Control VPC sharing in an AWS multi-account setup with service control policies

RSS Google Developers Blog

  • Join us for #30DaysOfFlutter
  • 21 websites and apps to make your 2021 better
  • Community leaders upskill themselves and find new roles with Elevate by Google Developers
  • Solve for the United Nations’ Sustainable Development Goals with Google technologies in this year’s Solution Challenge.
  • Announcing New Smart Home App Discovery Features

RSS Google Cloud Platform Blog

  • New white paper: Strengthening operational resilience in financial services by migrating to Google Cloud
  • Lifecycle of a container on Cloud Run
  • BeyondCorp Enterprise: Introducing a safer era of computing
  • How our customers modernize business intelligence with BigQuery and Looker
  • Show me the money! How you can see returns up to $259M with a DevOps transformation

RSS Thinking Out Cloud

  • Links for 2017-02-22 [del.icio.us]
  • Links for 2016-08-23 [del.icio.us]
  • Links for 2016-08-08 [del.icio.us]
  • Links for 2016-08-05 [del.icio.us]

Tags

acls ami ansible appscale autoscaling aws aws compatibility aws ec2 boto cloud-init cloud administrator cloud computing cloudformation coreos coreos cluster coreos etcd docker drbd ec2 elb emi emis.eucalyptus.com Euare euca2ools euca2ools 3 eucalyptus eucalyptus 2.0 eucalyptus 3.4 eucalyptus 4.0 eucalyptus 4.0.2 eucalyptus load balancer eustore eutester git haproxy high availability hybrid cloud iaas IAM image management ipython lvm mac os x mdb neo4j openldap paas Personal precise private cloud python boto s3 s3cmd stackato ubuntu cloud image ubuntu cloud images ubuntu raring varnish walrus xcode

Follow me on Twitter

My Tweets

instance debugging

CirrOS: Perfect Machine Image for Eucalyptus Cloud Debugging

February 2, 2014February 3, 2014 hspencer77cirrOS, cloud computing, ec2metadata, emis.eucalyptus.com, euca2ools, eustore, instance debuggingLeave a comment

CirrOS is a a trimmed-down OS that has been developed to run on cloud environments. When deployed on Eucalyptus clouds, CirrOS is very effective in confirming the clouds have been set up to provide instance networking, and instance services (metadata and userdata – similar to whats provided on AWS).  Because its seen as being so helpful to cloud administrators, Eucalyptus added both 32 and 64 bit CirrOS images to eustore.  This blog entry will cover how to use eustore to bundle, upload and register the CirrOS image, and how to use it to test out instance services on a Eucalyptus cloud.

Recognition

Before discussing how to use CirrOS on Eucalyptus for instance debugging, I would like to thank the following people:

  • Victor Iglesias – Quality Engineer at Eucalyptus Systems, Inc – for introducing me to CirrOS.
  • Scott Moser – Ubuntu Server Technical Lead at Canonical – for creating CirrOS, along with other great cloud tools like Cloud-Init.

Deploying CirrOS on Eucalyptus

As a cloud administrator, adding CirrOS is relatively straight-forward when using eustore.  To start out, make sure the latest version of euca2ools has been installed. After downloading and sourcing the cloud administrator (i.e. admin user of the eucalyptus account) credentials, use eustore-describe-images to discover the CirrOS images on emis.eucalyptus.com:

$ eustore-describe-images | grep cirros
4001243952 cirros x86_64 experimental-images kvm CirrOS x86-64, 
Tiny image used for testing - root user login
1765979475 cirros i386 experimental-images kvm CirrOS i386, 
Tiny image used for testing - cirros user login
0300949733 cirros x86_64 experimental-images kvm CirrOS x86_64, 
Tiny image used for testing - cirros user login

To bundle, upload and register a CirrOS image, choose the image of your choice, and use eustore-install-image.  For example:

$ eustore-install-image -i 0300949733 -b cirros-0.3.1-x86_64 \
 --hypervisor kvm -s "CirrOS 0.3.1 - x86_64"

The image is now ready to be used on your Eucalyptus cloud.  Creating a keypair with euca-create-keypair:

$ euca-create-keypair euca-admin > euca-admin.priv

Use euca-authorize to allow SSH traffic to the instance.

$ euca-authorize -P tcp -p 22 \ 
-s 0.0.0.0/0 default

Next, launch the CirrOS image using euca-run-instances:

$ euca-run-instances -k euca-admin \
-t m1.medium emi-2611389B

After the instance has been launched successfully, lets look at some of the features of CirrOS that helps with troubleshooting instances.

Instance Status Checks in CirrOS

CirrOS provides great kernel messages when booting.  Not only does it show the boot sequence and discovery of devices, but it also shows information regarding network information and status of the instance userdata and metadata services.  To view this information, use euca-get-console-output on the instance based off the CirrOS image. For example:

$ euca-get-console-output i-B57B4273
i-B57B4273
2014-02-03T04:25:08.535Z
^[[1;256r^[[256;256H^[[6n
Google, Inc.
Serial Graphics Adapter 12/07/11
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mockbuild@c6b18n1.dev.centos.org) Wed Dec 7 17:04:47 UTC 2011
Term: 80x24
4 0
SeaBIOS (version seabios-0.6.1.2-26.el6)
........
Sending select for 172.17.125.24...
Lease of 172.17.125.24 obtained, lease time 86400
deleting routers
adding dns 10.104.1.216
adding dns 10.1.1.254
cirros-ds 'net' up at 0.68
checking http://169.254.169.254/2009-04-04/instance-id
successful after 1/20 tries: up 0.69. iid=i-B57B4273
failed to get http://169.254.169.254/2009-04-04/user-data
warning: no ec2 metadata for user-data
found datasource (ec2, net)
Starting dropbear sshd: generating rsa key... generating dsa key... OK
/run/cirros/datasource/data/user-data was not '#!' or executable
=== network info ===
if-info: lo,up,127.0.0.1,8,::1
if-info: eth0,up,172.17.125.24,27,fe80::d20d:b5ff:fe7b:4273
ip-route:default via 172.17.125.1 dev eth0
ip-route:172.17.125.0/27 dev eth0 src 172.17.125.24
=== datasource: ec2 net ===
instance-id: i-B57B4273
name: N/A
availability-zone: LayinDaSmackDown
local-hostname: euca-172-17-125-24.eucalyptus.internal
launch-index: 0
......

As viewed from the output, it provides some of the metadata information of the instance.  Because there was no userdata passed when launching the instance, the following error is seen:

/run/cirros/datasource/data/user-data was not '#!' or executable

To see all the metadata provided to the instance, SSH into the instance and run ‘ec2metadata’:

$ ssh -i admin-creds/euca-admin.priv cirros@euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com
The authenticity of host 'euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com (10.104.7.11)' can't be established.
RSA key fingerprint is ae:3a:3f:4d:fe:a2:ab:a6:8d:0c:56:3f:18:93:d1:f9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com,10.104.7.11' (RSA) to the list of known hosts.
$ ec2metadata
ami-id: emi-2611389B
ami-launch-index: 0
ami-manifest-path: cirros-0.3.1-x86_64/cirros-0.3.1-x86_64-rootfs.img.manifest.xml
block-device-mapping/ami: sda1
block-device-mapping/emi: sda1
block-device-mapping/ephemeral: sda2
block-device-mapping/ephemeral0: sda2
block-device-mapping/root: /dev/sda1
block-device-mapping/swap: sda3
hostname: euca-172-17-125-24.eucalyptus.internal
instance-id: i-B57B4273
instance-type: m1.small
kernel-id: eki-37D335EF
local-hostname: euca-172-17-125-24.eucalyptus.internal
local-ipv4: 172.17.125.24
mac: D0:0D:B5:7B:42:73
placement/availability-zone: LayinDaSmackDown
public-hostname: euca-10-104-7-11.eucalyptus.euca-hasp.eucalyptus-systems.com
public-ipv4: 10.104.7.11
public-keys/0: openssh-key
ramdisk-id: eri-487537CB
reservation-id: r-87584400
security-groups: default

Thats it!  As demonstrated, CirrOS helps cloud administrators test networking and instance services for instances relatively quickly.  Using CirrOS helps narrow down if there is a Eucalyptus cloud deployment issue versus an image issue. If you feel really adventurous, Scott has provided some great instructions on how cloud administrators can build their own CirrOS image by hand. Hope this helps.  Enjoy!

 

 

34.430176 -119.861645
CirrOS: Perfect Machine Image for Eucalyptus Cloud Debugging
Blog at WordPress.com.