Sei sulla pagina 1di 29

IBM WebSphere Portal and Lotus

Web Content Management

Amazon Machine Image (AMI) Get


Started Guide

Last updated December 8, 2009

Marshall Lamb (mlamb@us.ibm.com)


Xinyi Xu (xinyi@us.ibm.com)

WebSphere Portal Development, Software Group


IBM Research Triangle Park
Lotus AMI Usage Guide

1.

Table of Contents
1. INTRODUCTION........................................................................................ 3
1.1 Purpose................................................................................................... 3
1.2 Topics covered........................................................................................ 3
1.3 Assumptions............................................................................................ 3
1.4 AMI contents and configuration ............................................................... 4
2. INITIALIZING A NEW INSTANCE OF THE AMI........................................ 4
2.1 Amazon Instance Information .................................................................. 5
2.1.1 INSTANCE SIZES........................................................................................ 5
2.1.2 SECURITY GROUPS..................................................................................... 5
2.2 Managing AMI instances......................................................................... 5
2.3 Accessing the AMI instance ..................................................................... 5
2.3.1 CONSOLE ACCESS..................................................................................... 5
2.3.2 REMOTE DESKTOP ACCESS........................................................................... 6
2.4 Booting the AMI Instance ......................................................................... 7
2.4.1 CONFIGURATION MODULES SEQUENCE........................................................... 7
2.4.2 PRE-INSTALLED OS/SOFTWARE LICENSE AGREEMENT SCREENS.............................7
2.4.3 USER PASSWORD CONFIGURATION SCREENS..................................................... 7
2.4.4 AMAZON W EB SERVICES CONFIGURATION SCREENS........................................... 9
2.4.4.1 Manually input credential files.................................................................. 12
2.4.5 EBS CONFIGURATION MODULE.................................................................. 14
2.4.5.1 Creating a New EBS volume..................................................................... 15
2.4.5.2 Attaching an Existing EBS volume........................................................... 17
2.4.5.3 Use Internal Volatile Storage Only............................................................ 19
2.4.6 W EBSPHERE APPLICATION SERVER AND W EBSPHERE PORTAL CONFIGURATION
PROGRESS SCREENS........................................................................................... 21

3. WORKING WITH AN AMI INSTANCE..................................................... 23


3.1 File system locations............................................................................. 23
3.2 Starting and stopping WebSphere Portal .............................................. 24
3.3 Starting and stopping the HTTP Server ................................................. 24
3.4 Using WebSphere Portlet Factory (Development AMI Only) ................. 25
3.5 Accessing the site from a browser ......................................................... 26
3.6 User accounts........................................................................................ 26
4. SERVICING INSTANCES........................................................................ 27

5. REPACKAGING THE AMI....................................................................... 28

2
Lotus AMI Usage Guide

1. Introduction

1.1 Purpose
This document details the deployment instructions for WebSphere Portal® Server and
Lotus Web Content Management® Standard Edition 6.1.5 Amazon Machine Images
(here after referred to simply as “the AMI”) under the Amazon Elastic Compute Cloud™
(EC2™) infrastructure.
This AMI will allow you to experience the fully functional WebSphere Portal Server and
Web Content Management instance on Linux® on Amazon EC2. The AMI also includes
customized modules to guide you through the AMI instance configuration steps. The
remainder of this document will guide you through these steps, as well as how to build
new AMIs based on instances created based on the original. You may wish to build new
AMIs to contain your own custom WebSphere Portal Server and Lotus Web Content
Management Standard Edition solutions.

1.2 Topics covered


This document focuses on the process of setting up an instance of the AMI. It will cover
the following topics in detail:
► Initializing a new instance based on the AMI, including setting up persistent
storage for the instance via the use of Elastic Block Storage (EBS)
► Accessing and managing WebSphere Portal Server and Lotus Web Content
Management Standard Edition
► Creating a WebSphere Portlet Factory Project in Eclipse (Development AMI
only)
► Building a new AMI based on an instance you customize

1.3 Assumptions
This documentation is intended for users who have a general knowledge of Linux and
how Linux works. The user should also possess a good understanding of Linux
commands and how to manipulate input and output.

3
Lotus AMI Usage Guide

A basic overview of how to manage WebSphere Portal will be provided. The user will be
provided with links to product documentation for more detailed information and guidance
on how to use the product to build a Web site.

1.4 AMI contents and configuration


The WebSphere Portal and Lotus Web Content Management AMIs are preinstalled and
preconfigured instances of the product. Instances created based on these AMIs are
ready to use and have been preconfigured with certain features to make it easier to get
started. The product configuration includes:
• Security enabled: WebSphere Application Server security is enabled, with the
virtuser user ID serving as both the portal administrator and WebSphere
Application Server administrator id. During the initialization of the AMI, you will be
required to set the password for the virtuser user id.
• HTTP Server enabled: The IBM HTTP Server is configured to provide port 80
access to WebSphere Portal. See section 3.3 on how to use the HTTP Server.
• External DB2 database: An instance IBM DB2 Enterprise Edition is installed and
configured as WebSphere Portal and Lotus Web Content Management's external
database and user repository. This provides an enterprise class and highly
performing database environment.
• New Site Wizard: WebSphere Portal is preconfigured with the New Site Wizard,
available from the Portal Catalog, which aids in the creation of micro sites within
the portal. For more information, refer to the Portal Catalog entry.
• Default content sites: WebSphere Portal is preconfigured with two sample virtual
portals: a sample intranet content site, and a sample Internet content site. Both
sites are accessible through the virtual portal URIs /wps/portal/intranet and /wps/
portal/internet, respectively.
• Developer mode enabled: Developer mode speeds up the start time for
WebSphere Portal by deferring the start of individual web applications and portlets
until they are first requested by the end user. For more information on developer
mode, refer to the WebSphere Portal Information Center.
• WebSphere Portlet Factory: Eclipse and WebSphere Portlet Factory are
installed. (Development AMI only)

2. Initializing a new instance of the AMI


The following sections outline prerequisite information and steps for creating a new
instance of an AMI. Details of how to use the Amazon Web Services (AWS) tools to
access AWS, set up an account, and create AMI instances are not provided here. The
Getting Started Guide on the AWS Web site should be used first to become familiar with
this process: http://docs.amazonwebservices.com/AWSEC2/latest/
GettingStartedGuide/

4
Lotus AMI Usage Guide

2.1 Amazon Instance Information

2.1.1 Instance sizes


Amazon EC2 provides the flexibility to choose from a number of different instance types
to meet your computing needs. Each instance provides a predictable amount of
dedicated compute capacity and is charged per instance-hour consumed.

Typical deployments of WebSphere Portal Server and Lotus Web Content Management
Standard Edition require at least a Large image size, to have access to enough physical
memory and computing power. A small instance type is fine for development, single-
user purposes only.

Note that the WebSphere Portal and Lotus Web Content Management Development
AMIs are running with a 32-bit version of SuSE SLES Linux operating system, so only
32-bit instance types can be used. Production AMIs are 64-bit, so 64-bit enabled image
sizes should be used for production use.

For more information on instance types and pricing of Amazon EC2, please visit http://
aws.amazon.com/ec2/

2.1.2 Security groups


The security group you define and use when creating new instances needs to have
additional ports authorized for WebSphere Portal. Ensure you have the following ports
authorized:

• 10040: Default HTTP port for the WebSphere Portal instance


• 10027: Application server administration console port
• 80: Web server port

See the AWS documentation for more information.

2.2 Managing AMI instances


AWS provides a simple Web console for managing AMI instance and EBS storage
volumes: https://console.aws.amazon.com/.

2.3 Accessing the AMI instance

2.3.1 Console access


The AMI is configured to allow secure shell (SSH) access with automatic root user
authentication using a secure RSA private key based on the keypair specified at
instance creation. The user will need the RSA private keypair saved to a local file that
can be used as input to SSH.

5
Lotus AMI Usage Guide

For Linux SSH users, the keypair file is simply provided on the command line using the -
i parameter. For example:

ssh –i <location of rsa keypair file> <instance public address>

For Putty users, Amazon has documentation on how to configure Putty with the public
key for automatic authentication: http://docs.amazonwebservices.com/
AWSEC2/2007-03-01/GettingStartedGuide/putty.html

Amazon also has a video that demonstrates how to set up Putty: http://
developer.amazonwebservices.com/connect/entry.jspa?externalID=583.

File transfer is allowed using secure FTP (SFTP) along with the secure keypair used for
SSH access.

Note: Only SSH access using the secure keypair is allowed. Instances created based
on these AMIs have password-based authentication disabled for higher security.

2.3.2 Remote desktop access


The SuSE installation has vncserver automatically included, so you can use a free VNC
client to remotely connect to the instance's graphical desktop. The boot sequence of the
new instance, described below, also sets up desktop icons to help with starting and
stopping the WebSphere Portal server as well as access the portal home page and
administrative console.

To enable vncserver, do the following:


1. Switch users to “virtuser”, since the desktop icons belong to virtuser's desktop.
Alternatively, the desktop icons can be copied from /home/virtuser/Desktop to /root/
Desktop if running the desktop for root user is preferred.
> su virtuser

2. Start the VNC server in the background:


> vncserver

You can now access the instance remotely using its public DNS host name. For
example:
vncviewer ec2-174-129-160-99.compute-1.amazonaws.com:1

2.4 Booting the AMI Instance

When an AMI instance is first booted and accessed over SSH, the user will be prompted
to accept the license agreements of software components pre-installed on the AMI.
Next, a sequence of AWS and product-specific instance configuration modules allow the
user to configure the AMI according to their specific needs. This section provides an
outline and description of each step of the initial configuration process.

6
Lotus AMI Usage Guide

2.4.1 Configuration Modules Sequence


When an AMI instance is started for the very first time, a user will go through the
following interactive configuration steps in sequence before the system is ready to use:
1. Pre-installed OS/software license agreement screens (production AMIs only)
2. Password configuration screens
3. Amazon Web Services access configuration screens
4. Elastic Block Storage (EBS) configuration screens
5. WebSphere Application Server and WebSphere Portal configuration progress
screen
A description of each interactive step is listed in the next several sub-sections.

2.4.2 Pre-installed OS/software license agreement


screens
When a production AMI instance boots for the very first time, the first step is to go
through the license agreement screens. (License agreements for Development AMIs
are covered by a different process and so are not shown during the boot-up sequence.)
This is to ensure that the user has accepted all required operating system and the
license agreements of pre-installed software components before starting to use the
instance.
The user must agree to all the licenses shown, otherwise the instance will terminate.

2.4.3 User password configuration screens


The next set of screens require the user to reset the passwords for the root and
virtuser users. Virtuser is the WebSphere Application Server and WebSphere Portal
administrative user. Use virtuser to login to either WebSphere Portal or the WebSphere
Application Server administration console.

7
Lotus AMI Usage Guide

Figure 1 Password configuration for the root user

Figure 2 Password configuration for the virtuser user

8
Lotus AMI Usage Guide

Figure 3 Password configuration results

2.4.4 Amazon Web Services configuration screens


After the operating system/software license agreement screens, the Amazon Web
Services configuration screens will show.
These screens allow the user to setup the AWS credentials required for the usage of
Elastic Block Storage, which will be discussed in the next sub-section.

9
Lotus AMI Usage Guide

Figure 4 AWS credentials setup choices

For this module, there are two methods of transferring over the credential files that you
generated as part of your AWS account creation: a key file and certificate file.
The first method is to copy over the files directly to your instance using secure FTP
(SFTP) or secure copy (SCP). Now would be a good time to transfer the key and
certificate files to a local directory in the image, such as /mnt, which will be
referred to in the next section.
The second method is to manually input the credential files as described in section
2.2.3.1. This method is not recommended when working in a command line
environment.
Following the first method, choose the option Certificate and Private Key exist locally.
Select [Next] and press Enter to continue.

10
Lotus AMI Usage Guide

Figure 5 Local private key and certificate selection

Enter in the location of the private key and the certificate files in the corresponding input
boxes, and select [Next]:

Figure 6 Local private key and certificate file location selection

11
Lotus AMI Usage Guide

The module will run an API command to validate the AWS credentials. If successful,
you will be prompted with the following result dialog. Select [End] to continue.

Figure 7 AWS credential configuration results

2.4.4.1 Manually input credential files


To manually input the credential files, select the option Manually enter contents for
certificate and private key on the first screen of the AWS Credentials Configuration
page. Select [Next] to continue.

12
Lotus AMI Usage Guide

Figure 8 Manually enter certificate and private key selection

The next page contains fields that have input boxes for the X.509 certificate and private
key files. Copy and paste the corresponding files’ contents into the dialog boxes. To
paste in a PuTTY window, simply click the right mouse button.

Figure 9 Manual entry of the certificate and private key

13
Lotus AMI Usage Guide

When you are done pasting the content of the files, select [Next]. An EC2 API
command will be run against the credentials to see if they are valid. If the credentials
are valid, the result dialog will appear. Select [End] to complete the module.

Figure 10 AWS credential configuration results

If you selected to skip AWS credential configuration on the first screen of the AWS
Credentials Configuration page, then setting up an EBS storage volume will be skipped
and WebSphere Portal Server and Web Content Management Standard Edition will
operate from a configuration stored locally in the EC2 instance, which is not
recommended. If the instance prematurely terminates, then all previous work will be lost.
See the next section for details.

2.4.5 EBS Configuration Module


Amazon EBS is a persistent storage option for EC2. Since instance storage is volatile,
data that is required to be available beyond the lifetime of an AMI instance must be
stored on an EBS volume. The EBS Configuration module can either create a new
EBS volume, mount a pre-existing EBS volume , or use the instance’s own internal
volatile storage. The AWS credentials must be set up successfully in the previous AWS
Configuration Module in order for this module to run.

Note that if an AMI instance prematurely terminates, because of an operating system


error, for example, then the AMI instance is lost and a new instance must be created.
That is why it is important to consider leveraging EBS to persist vital configuration data.

14
Lotus AMI Usage Guide

2.4.5.1 Creating a New EBS volume


To create a new EBS volume, select the first option, and select [Next]:

Figure 11 New EBS volume selection

Choose the size of the EBS volume by entering an integer between 1 and 1000
(gigabytes), and select [Next]. We recommend at least 5 GB:

15
Lotus AMI Usage Guide

Figure 12 EBS volume size

A status bar and conditions will be presented while the volume is being created and
mounted. The below result dialog will appear upon completion. Select [End] to exit the
module.

Figure 13 EBS configuration results

16
Lotus AMI Usage Guide

2.4.5.2 Attaching an Existing EBS volume


To mount an existing volume associated with your AWS account, choose the second
option, and select [Next]:

Figure 14 Existing EBS volume selection

The next screen will show details regarding the EBS volumes that you may have
associated with your account. If this is your first time using Amazon EC2, there may not
be any volumes available. As such, creating a new volume will be the only option to use
persistent storage with an AMI instance. Please refer to the previous section in this
case.
Note that only EBS volumes located in the same zone as your instance and are not
already attached to any instance will be shown. If there are available volumes, select a
volume by highlighting it in the selection box. You will also be presented with an option
to format the volume. To format the volume, please select the Format Volume
checkbox. Select [Next] to continue.

17
Lotus AMI Usage Guide

Figure 15 Existing EBS volume selection, part 2

A status bar and conditions will be presented while the volume chosen is being attached
and mounted. The result dialog will appear when the aforementioned steps are
completed, as shown. Select [End] to complete the module.

18
Lotus AMI Usage Guide

Figure 16 EBS configuration results

2.4.5.3 Use Internal Volatile Storage Only


If you decide to store your data only within the volatile storage provided inside an AMI
instance, choose Use internal storage (volatile) option and select [Next] to continue.

19
Lotus AMI Usage Guide

Figure 17 Use internal storage selection

An alert dialog will be shown. Select [Yes] to continue with using volatile storage, or
select [No] to go back to the menu.

Figure 18 Use internal storage warning

20
Lotus AMI Usage Guide

2.4.6 WebSphere Application Server and WebSphere


Portal configuration progress screens
After the password EBS configuration screens are completed, the software configuration
module will run. This module will present a progress dialog as it updates the
WebSphere Application Server, WebSphere Portal, DB2 and Web Content
Management components with the information provided so far. Specifically:
1. The software configuration will be updated with the new instance's hostname and
virtuser password
2. The volatile file system directories (WebSphere Application Server configuration
profile and DB2 database instance) will be backed up and relocated to the EBS
volume newly attached and mounted.
Note: If volatile storage was selected in the previous configuration screens (no EBS
volume usage), then these volatile file system directories are still copied to the /mnt
directory as that volume has significantly more storage than the root (/) file system.

Figure19 Application server configuration progress

In Figure 19, the application server configuration progress is tracked. During this
process, the application server and WebSphere Portal's configuration profile is updated
with the new instance's host name and the new virtuser password. The datasource
configurations are also updated to point to the local database instance using the new
internal host name of the instance. Note that this process can take several minutes
to complete.

21
Lotus AMI Usage Guide

Once system configuration is completed, the following screen will appear showing that
the configuration is successful. Select [End] to continue.

Figure 19 Application server configuration results

Initial configuration is now complete and the system is ready to use. The next section
describes how to get started working with the new instance.

3. Working with an AMI instance


Congratulations on completing the instantiation of a WebSphere Portal Server and Web
Content Management Standard Edition AMI. We will now orient you on how to get
started with the system. For more information on how to administer, customize, and
develop applications for the portal and web content management platform, refer to the
online product documentation: http://www.ibm.com/developerworks/websphere/zones/
portal/proddoc.html

3.1 File system locations


Item Location
WebSphere Portal installation /opt/IBM/WebSphere/PortalServer
directory

22
Lotus AMI Usage Guide

WebSphere Application Server /opt/IBM/WebSphere/AppServer


installation directory
Application server configuration /opt/IBM/WebSphere/wp_profile
profile
DB2 install directory /opt/ibm/db2
DB2 instance directory /home/db2inst1/db2inst1
WebSphere Portal log directory /opt/IBM/WebSphere/wp_profile/logs/
WebSphere_Portal
IBM HTTP Server installation /opt/IBM/WebSphere/HTTPServer
directory (production AMI only)
Eclipse installation directory /opt/eclipse
(development AMI only)
WebSphere Portlet Factory /opt/IBM/WPFactory
installation directory (development
AMI only)

3.2 Starting and stopping WebSphere Portal


Starting and stopping WebSphere Portal is accomplished by using the WebSphere
Application Server startServer.sh and stopServer.sh shell scripts, respectively.
Open a secure shell session with your new instance, then change to the /opt/IBM/
WebSphere/wp_profile/bin directory. To start WebSphere Portal, run the following
command from within this directory:
./startServer.sh WebSphere_Portal
Likewise, stop WebSphere Portal using the following command within the same
directory:
./stopServer.sh WebSphere_Portal -user virtuser -password <password>
Note that with the stopServer.sh script, it is required to specify the administrative user
(virtuser) and password, which was provided in the password configuration panels
during initial setup of this instance.
If you are accessing the graphical desktop remotely, there are icons on the desktop for
starting and stopping WebSphere Portal.

3.3 Starting and stopping the HTTP Server


The AMI comes preconfigured with the IBM HTTP Server to allow port 80 access to
WebSphere Portal. By default, the HTTP Server is stopped. To start the HTTP Server,
change to the /opt/IBM/HTTPServer/bin directory and run the following command:

23
Lotus AMI Usage Guide

./apachectl start
Likewise, to stop the HTTP Server, run the following command:
./apachectl stop

The HTTP Server reads its application server plugin configuration from /opt/IBM/
HTTPServer/Plugins/config/webserver1/plugin_cfg.xml, which gets automatically
refreshed during AMI instance creation.

3.4 Using WebSphere Portlet Factory


(Development AMI Only)
The AMI comes preinstalled with the IBM WebSphere Portlet Factory and Eclipse for
developing portlet applications. To utilize WebSphere Portlet Factory, connect to the
AMI instance by VNC Viewer as virtuser, After logging in, you may either change to
the /opt/eclipse directory and run the following command:
./eclipse
Or
click WebSphere Portlet Factory desktop icon.
After Eclipse started, you may be prompted with:

Enter your desired location, We would recommend /mnt/portalfs/workspace. Then click


OK.
You may change the workspace perspective by clicking Window > Open Perspective >
Other, and selecting WebSphere Portlet Factory, and clicking OK.
You may create a WebSphere Portlet Factory Project by clicking File > New >
WebSphere Portlet Factory Project, and following its wizard.

24
Lotus AMI Usage Guide

For more information on using WebSphere Portlet Factory, see the product
documentation center: http://www.ibm.com/software/genservers/portletfactory.

3.5 Accessing the site from a browser


After WebSphere Portal has started, you can access it using the following URLs:

WebSphere Portal home page (if HTTP Server is stopped):

http://<public host name>:10040/wps/portal

WebSphere Portal home page (if HTTP Server is active):

http://<public host name>/wps/portal

WebSphere Application Server admin console:

http://<public host name>:10027/ibm/console

If you are accessing the graphical desktop remotely, there are icons on the desktop for
accessing the portal home page and administration console.

4. Servicing instances
WebSphere Portal Server and Lotus Web Content Management Standard Edition can
be serviced on the AMI instance just like any other native installation of this software.
Corrective service packages, in the form of iFixes (or “interim fixes”, which address a
particular product issue) or fixpacks (regular, cumulative roll-ups of iFixes into a single
installable unit), are available to be downloaded from the IBM support site:

WebSphere Portal: http://www-01.ibm.com/software/genservers/portal/support/

Lotus Web Content Management: http://www-01.ibm.com/software/lotus/products/


webcontentmanagement/support/

From these sites, you can search on problem symptoms and receive information on
technotes, redbooks, and fixes that may address that problem.

iFixes and fixpack installation requires the use of the Portal Update Installer, which can
be downloaded from here: http://www.ibm.com/support/docview.wss?uid=swg24006942

25
Lotus AMI Usage Guide

Alternatively, you may wish to re-apply your customizations to a new instance created
from an AMI that has been updated to a more recent service level. To do this, you will
need to have extracted all custom artifacts from the instance so that they can be applied
again, such as:
• Exported content libraries, using the ConfigEngine's export-wcm-data task
• Exported portal configuration using the xmlaccess utility
• All portlet WAR files and other J2EE resources

Then, after creating a new instance, these artifacts can be imported into the new
instance using the appropriate administration utilities.

Refer to the WebSphere Portal InfoCenter for topics on administering WebSphere


Portal, and the use of the xmlaccess utility specifically: http://publib.boulder.ibm.com/
infocenter/wpdoc/v6r1m0/index.jsp

Refer to the Lotus Web Content Management InfoCenter for topics on exporting and
importing content libraries: http://publib.boulder.ibm.com/infocenter/wcmdoc/v6r0/
index.jsp

5. Repackaging the AMI


After customizing an instance of a WebSphere Portal Server and Web Content
Management Standard Edition AMI with custom applications, site designs, and content
libraries, you may want to build a new AMI based on this instance from which new
instances can be created. The EC2 tools are already installed and configured on your
instance, so follow the instructions below to prepare and upload a new AMI.

1. Stop WebSphere Portal using either the desktop icon or the stopServer.sh script, as
described in section 3.2.

2. First switch to the db2inst1 user then stop DB2, as follows:


> su db2inst1
> db2stop
> <ctrl-d>

The last command exits the db2inst1 user shell and returns back to root user.

3. Change to the /var/adm/ibmvmcoc-postinstall directory and run the resetvm.sh


shell script to prepare the software and operating system for reinitialization. If the
system is rebooted after running this script, then the user will be presented with the
initialization screens documented in section 2.2.
> cd /var/adm/ibmvmcoc-postinstall
> ./resetvm.sh

This also removed the automatic mounting of an EBS volume from the /etc/fstab file,
so when the system is rebooted, there will be no EBS volume mounted.

26
Lotus AMI Usage Guide

Note: The resetvm.sh may display errors about files not being found or instruct you
to reboot the system. Ignore any of these messages and proceed to the next step
below.

4. Since you have customized portal and web content, you will need to replace the
default wp_profile configuration profile and db2inst1 instance archives with the
customized versions:
> cd /
> rm /opt/IBM/WebSphere/wp_profile
> zip -r /opt/IBM/WebSphere/wp_profile.zip /mnt/portalfs/
wp_profile

> cd /
> rm /home/db2inst1/db2inst1
> zip -r /home/db2inst1/db2inst1.zip /mnt/portalfs/db2inst1

Now, when a new instance is created, your customized data will be used instead of
the default configuration. If any other volatile data is stored on an EBS volume, this
will need to also be copied back into the local filesystem to be stored with the AMI.

5. Bundle the new AMI, to get it ready for uploading to Amazon's Simple Storage
Service (S3). The ec2-bundle-vol command requires the private key and certificate
files associated with your Amazon account, and probably already uploaded as part of
the original AWS configuration for this instance (see section 2.3.4).
> ec2-bundle-vol -k /mnt/pk.pem -c /mnt/cert.pem -u <AWS_ID> -p
ami_v1 -d /mnt/ec2

Specify the location of your private key and certificate files if different than above, for
the -k and -c parameters. Also provide your 12-digit AWS ID in place of <AWS_ID>.
Specify a meaningful package name for the new AMI instead of “ami_v1”. And lastly,
be sure to place the new bundle under the /mnt directory, which has plenty of space
to hold the new image. The example places it under /mnt/ec2, which is a directory
you will have to created.

For more information on this command, refer to the Amazon documentation: http://
docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/CLTRG-ami-bundle-
vol.html

6. Upload the bundle to S3. This requires a bucket to store the image in, which helps
you organize all of your AMIs by “buckets”. If the bucket you specify doesn't exist, it
will be created:
> ec2-upload-bundle -b ami_bucket -m /mnt/ec2/ami_v1.manifest.xml
-a <AWS_access_key> -s <AWS_secret_access_key> --retry

Specify the bucket to use instead of “ami_bucket”. Also specify the bundle's manifest
file and location instead of “/mnt/ec2/ami_v1.manifest.xml”. You will need to provide
your AWS access and secret access keys for the -a and -s parameters, which can be
obtained from under Your Account -> Access Identifiers after logging into Amazon
Web Services (http://aws.amazon.com/). Lastly, the –retry option ensures the upload
continues where it left off if there was a network error.

27
Lotus AMI Usage Guide

7. Register your new AMI. Again, you will need your private key and certificate files for
this operation.
> cd /root/ec2/bin
> ./ec2-register -K /mnt/pk.pem -C /mnt/cert.pem ami_bucket/
ami_v1.manifest.xml

Instead of “ami_bucket/ami_v1.manifest.xml”, you will need to specify the bucket and


manifest name that you used during upload. After registration, you are now ready to
create instances based on your new AMI!

28
© Copyright IBM Corporation 2009
All Rights Reserved.

IBM Canada
8200 Warden Avenue
Markham, ON
L6G 1C7
Canada

Printed in Canada
01/2009

IBM, IBM (logo), DB2 are trademarks or registered trademarks of The information in this publication is provided AS IS without
International Business Machines Corporation in the United States, warranty. Such information was obtained from publicly available
other countries, or both. sources, is current as of January 2009, and is subject to change.
Any performance data included in the paper was obtained in the
Linux is a trademark of Linus Torvalds in the United States, other specific operating environment and is provided as an illustration.
countries, or both. Performance in other operating environments may vary. More
specific information about the capabilities of products described
UNIX is a registered trademark of The Open Group in the United should be obtained from the suppliers of those products.
States, other countries, or both

Windows is a trademark of Microsoft Corporation in the United


States, other countries, or both.

Java is a trademark of Sun Microsystems, Inc in the United States,


other countries, or both.

Amazon Web Services, AWS, Amazon Elastic Compute Cloud,


EC2, Amazon Simple Storage Service, Amazon S3 are trademarks
of Amazon.com, Inc. or its affiliates in the United States and/or other
countries

Other company, product, or service names may be trademarks or


service marks of others.

References in this publication to IBM products or services do not


imply that IBM intends to make them available in all countries in
which IBM operates. The following paragraph does not apply to the
United Kingdom or any other country where such provisions are
inconsistent with local law:

INTERNATIONAL BUSINESS MACHINES CORPORATION


PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-
INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.

Some states do not allow disclaimer of express or implied warranties


in certain transactions, therefore, this statement may not apply to
you.

This information could include technical inaccuracies or


typographical errors. Changes are periodically made to the
information herein; these changes will be incorporated in new
editions of the publication. IBM may make improvements and/or
changes in the product(s) and/or the program(s) described in this
publication at any time without notice.

Information concerning non-IBM products was obtained from the


suppliers of those products, their published announcements or other
publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any
other claims related to non-IBM products. Questions on the
capabilities of non-IBM products should be addressed to the
suppliers of those products.

Potrebbero piacerti anche