AMI simple deployment: OpenSolaris 2008.05-91 Glassfish and MySQL AMI image
Thursday Sep 11, 2008
This entry is part of 'OpenSolaris on Amazon EC2' workshop
| ami-3cf81c55 | aki-b78367de | ari-b68367df | sun-osol/opensol2008.05-b91-GF-MySQL.img |
Amazon EC2 OpenSolaris 200805-91 AMI Image with Glassfish V2 and MySQL 5.1 based on ami-89ef0be0 MySQL 5.1.x AMI image , origin is OpenSolaris 2008.05-91 ami-41e70328 image.
MySQL use for data /export/home/data2, I will use it for Glassfish installation too, so I can build a persistent storage solution (EBS) using this Glassfish and MySQL image.
Prepare Java 6 Environment
By default only Java 6 JRE is installed on OpenSolaris 200805-91, but we need JDK, we also need MySQL JDBC drivers.
1. Update package system
pkg refresh pkg install -nv SUNWipkg@0.5.11-0.91 Before evaluation: UNEVALUATED: +pkg:/SUNWipkg@0.5.11,5.11-0.91:20080807T173946Z After evaluation: pkg:/SUNWipkg@0.5.11,5.11-0.91:20080620T101740Z -> pkg:/SUNWipkg@0.5.11,5.11-0.91:20080807T173946Z None pkg install SUNWipkg@0.5.11-0.91 DOWNLOAD PKGS FILES XFER (MB) Completed 1/1 154/154 1.40/1.40 PHASE ACTIONS Removal Phase 1/1 Update Phase 136/136 Install Phase 22/22
- Install Java 6 JDK
pkg install SUNWj6dev DOWNLOAD PKGS FILES XFER (MB) Completed 1/1 56/56 48.18/48.18 PHASE ACTIONS Install Phase 86/86 pkg list SUNWj6dev NAME (AUTHORITY) VERSION STATE UFIX SUNWj6dev 0.5.11-0.91 installed u---
3. Install MySQL 5 jdbc driver
pkg install SUNWmysql5jdbc DOWNLOAD PKGS FILES XFER (MB) Completed 1/1 12/12 1.29/1.29 PHASE ACTIONS Install Phase 22/22 pkg list SUNWmysql5jdbc NAME (AUTHORITY) VERSION STATE UFIX SUNWmysql5jdbc 5.1.5-0.95 installed ---- pkg contents SUNWmysql5jdbc | grep jar usr/mysql/connectors/jdbc/5.1/mysql-connector-java-5.1.5-bin.jar
Install Glassfish V2 U2
cd /export/home/data/2
- Select Glassfish distribution (I select simple devel one)
https://glassfish.dev.java.net/downloads/v2ur2-b04.html
- Get Glassfish install JAR
wget http://www.java.net/download/javaee5/v2ur2/promoted/SunOS_X86/glassfish-installer-v2ur2-b04-sunos_x86-ml.jar
- Install Glassfish into /export/home/data2
java -Xmx256m -jar glassfish-installer-v2ur2-b04-sunos_x86-ml.jar
create.domain:
[exec] Using port 4848 for Admin.
[exec] Using port 8080 for HTTP Instance.
[exec] Using port 7676 for JMS.
[exec] Using port 3700 for IIOP.
[exec] Using port 8181 for HTTP_SSL.
[exec] Using default port 3820 for IIOP_SSL.
[exec] Using default port 3920 for IIOP_MUTUALAUTH.
[exec] Using default port 8686 for JMX_ADMIN.
[exec] Domain being created with profile:developer, as specified by variable AS_ADMIN_PROFILE
in configuration file.
[exec] Security Store uses: JKS
[exec] Domain domain1 created.
[exec] Admin login information for host [localhost] and port [4848] is being overwritten with
credentials provided. This is because the --savelogin option was used during
create-domain command.
[exec] Login information relevant to admin user name [admin] for this domain [domain1] stored
at [/root/.asadminpass] successfully.
[exec] Make sure that this file remains protected. Information stored in this file will be used
by asadmin commands to manage this domain.
[delete] Deleting: /export/home/data2/glassfish/passfile
- Check installed Galssfish V2 U2
cd /export/home/data2/glassfish
./bin/asadmin start-domain domain1
Starting Domain domain1, please wait.
Log redirected to /export/home/data2/glassfish/domains/domain1/logs/server.log.
Redirecting output to /export/home/data2/glassfish/domains/domain1/logs/server.log
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun Java System Application Server 9.1_02 (build b04-fcs)] with
its configuration and logs at: [/export/home/data2/glassfish/domains].
Admin Console is available at [https://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://domU-12-31-39-00-88-61.compute-1.internal:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain does not support application server clusters and other standalone instances.
5. Check login to Glassfish administration
http://amazon_public_honstname:4848/ User: admin Password:adminadmin
Tags: amazon_aws cloud glassfish opensolaris










