Difference between revisions of "Amazon AMIs"

From WA2IAC Wiki
Jump to: navigation, search
(Dealing with missing stuff in Amazon AMI's)
 
(Amazon ec2 AMI Miscellaneous Notes)
 
Line 1: Line 1:
 +
= Introduction =
 +
 +
Presently a catch-all for Amazon AMI related info.
 +
 +
== Instance Console ==
 +
 +
From the AWS pages... http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-GetConsoleOutput.html
 +
 +
Description
 +
 +
Gets the console output for the specified instance.
 +
 +
Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.
 +
 +
Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which will be available for at least one hour after the most recent post.
 +
 +
For Linux/UNIX instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a machine. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.
 +
 +
For Windows instances, the instance console output displays the last three system event log errors.
 +
 +
The short version of this command is '''ec2gcons'''.
 +
 +
Tip
 +
 +
If you are using the AWS CLI, see get-console-output instead.
 +
Syntax
 +
 +
ec2-get-console-output
 +
Description
 +
 +
Gets the console output for the specified instance.
 +
 +
Instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 API and command line interface.
 +
 +
Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which will be available for at least one hour after the most recent post.
 +
 +
For Linux/UNIX instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a machine. This output is buffered because the instance produces it and then posts it to a store where the instance's owner can retrieve it.
 +
 +
For Windows instances, the instance console output displays the last three system event log errors.
 +
 +
The short version of this command is ec2gcons.
 +
 +
Tip
 +
 +
If you are using the AWS CLI, see [http://docs.aws.amazon.com/cli/latest/reference/ec2/get-console-output.html get-console-output] instead.
 +
 +
http://docs.aws.amazon.com/cli/latest/reference/ec2/get-console-output.html
 +
 +
 +
 +
 +
== Using CentOS Packages ==
 
Sort of CentOS like, but many things taken out for Amazon's convenience and security.
 
Sort of CentOS like, but many things taken out for Amazon's convenience and security.
 +
 +
The purpose of _this mission_ is to install iperf, jperf, and ntop...
  
 
Experement de jour:
 
Experement de jour:
Line 5: Line 59:
 
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
 
http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
  
Try doing this with an AMI
+
* You can find a complete listing of the RPMforge package packages at http://packages.sw.be/
 +
 
 +
This gets the RPM, imports the key, verifies the RPM and tells you how to modify the repos in the "vanilla" manner. I won't reiterate here except up to the actual installation, which necessarily occurs in my user directory...
 +
 
 +
Try doing this with an Amazon AMI
 +
 
 +
The Amazon AMI (I'm working with) repos.d looks like:
 +
 
 +
<pre>
 +
$ ls /etc/yum.repos.d
 +
amzn-main.repo          amzn-nosrc.repo.rpmsave    amzn-updates.repo          epel.repo
 +
amzn-main.repo.rpmsave  amzn-preview.repo          amzn-updates.repo.rpmsave  epel-testing.repo
 +
amzn-nosrc.repo        amzn-preview.repo.rpmsave
 +
</pre>
 +
 
 +
Now we do the install from the RPM (makes it easier to remove later ?)
 +
 
 +
<pre>
 +
bash-4.1$ pwd
 +
/users/username/CentOS
 +
bash-4.1$ rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm
 +
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)
 +
bash-4.1$ sudo rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm
 +
bash-4.1$ # no response is a good response...
 +
bash-4.1$ ls /etc/yum.repos.d
 +
amzn-main.repo          amzn-preview.repo          [redacted]        mirrors-rpmforge-extras
 +
amzn-main.repo.rpmsave  amzn-preview.repo.rpmsave  epel.repo          mirrors-rpmforge-testing
 +
amzn-nosrc.repo          amzn-updates.repo          epel-testing.repo  rpmforge.repo
 +
amzn-nosrc.repo.rpmsave  amzn-updates.repo.rpmsave  mirrors-rpmforge
 +
bash-4.1$ yum repolist
 +
repo id                                      repo name                                                  status
 +
amzn-main/latest                              amzn-main-Base                                                5,019
 +
amzn-updates/latest                          amzn-updates-Base                                                886
 +
rpmforge                                      RHEL latest - RPMforge.net - dag                          4,145+573
 +
bash-4.1$
 +
</pre>
 +
 
 +
iperf - installed
 +
jperf - not there
 +
htop - installed
 +
ntop - not there
 +
 
 +
http://centoshowtos.org/network-and-security/iperf/
 +
... has basic information on using iperf
 +
 
 +
After done, save repos file from /etc/yum.repos.d to home directory to prevent "bad things from happening in the interregnum".

Latest revision as of 20:23, 16 February 2015