Virtual Guru's Blog – Home of Virtualization Workshops

November 30, 2009

OpenSolaris JeOS Prototype (Part 7: JeOS Install Base Targets)

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization — natiku @ 5:45 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

Lessons Learned from Amazon EC2 (AWS) show then network stability can be significant factor preventing users get instant experience, plus in Europe lot of users still have slow mobile connection or small download limits. We don’t have CD packages based install option as Linux distributions have, mitigation is to build as distribute Virtual Machine image with repository freeze, as I will demonstrate later.

Lessons Learned from initial PKG list creation show then IPS PKG repository design have capability to process dependencies, but repository content is not ready to drive CLI installs, there are missing high level dependencies, it’s demonstrated later on OpenSolaris 2008.11 CLI JeOS prototype. Also user experience with PKG in CLI is far from one on GUI, we missing better search capabilities in “names/groups”, easy querying of important attributes like sizing ,Debian like “suggest” feature and , Some CLI services are still dependent on CLI, like new “Removal Devices Manager”

Lessons Learned from Virtualizations forums show then users are now have more powerful computers, but they lost in mist cases wiliness to install multiple Virtualizatton products, this is because most of them now use Hardware Assisted Virtualizationts and will collide with each other, so if it will be possible we need provide more virtual images formats so user have choice to select not colliding one.

Lessons Learned from OpenSolaris 2008.05 , there is “no man pages, its very difficult to work in CLI without past Solaris CLI experience”.

Based on this experience it looks a better strategy for this level OpenSolaris 2008.11 / 2009.06 CLI JeOS prototype to have common ONE image with ONE development, ONE QA investments cots:

Target Implementation Comments
Selected Architecture x86 and x86-64(SPARC) OpenSolaris offer both architectures in one installation(Use SPARC port for 2009.60)
Selected Platforms Major 10 Virtualization Technologies Most Virtualization technologies emulate similar HW, so only limited set of drivers will be needed
Selected Environments Virtual Environments Support specifics need of Virtual Environments, like Cloud Amazon EC2 (AWS)
Keep Solaris Advantage Main OpenSolaris features Include major technologies which differentiate OpenSolaris
base on official GUI Live-CD installation – this will potentially also address supportability
User Experience Advanced Users Truly App Developers oriented, must not require CLI administration experience,
minimize work needed in CLI to run in your supported virtualization
User Groups Solaris ,OpenSolaris,Linux, Windows Solaris and Linux can be a GUI oriented developers with minimum CLI experience,
Windows support will be limited to minimum connectivity only
Network dependency Follow up Live-CD logic Out-of-the box experience for selected scenarios below without need to install PKGs from net

Some initial participation teams requirements on top reduces JeOS images was:

Team Requirement Package Size Note
Netbeans Editor with syntactic highliting SUNWvim 16.5 MB
Netbeans FTP server SUNWftp 346 KB
Amazon EC2 (AWS) EC2 tools – Ruby SUNWruby18 5.51 MB
Amazon EC2 (AWS) EC2 tools – Java SUNWj6rt 88.6 MB
OpenSolaris Install Python Need extra? Do we need Python Extra
OpenSolaris Install BE env beadm Part of System Core

OpenSolaris 200906 JeOS Prototype project is mowed to new location

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization — natiku @ 2:36 am

OpenSolaris 200906 JeOS Prototype project is mowed to new location on new OpenSolaris HUB system, at:


JeOS: Just enough OS Project

OpenSolaris 200906 JeOS Prototype are avaiable for downloads

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization — natiku @ 2:27 am

We finally make avaiable downloads for OpenSolaris 200906 JeOS Prototype in various virtualization formats, you can get VM images at:

OpenSolaris 2009.06 JeOS Prototype VM Image

July 16, 2009

Metapackage is on DC and AI instaling faster then just list of packages

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization, vmware — natiku @ 12:32 am

During Reduced OpenSolaris 200906 Prototyping I found then installing is in DC and AI much faster when I use only fully local repository in addition with one Metapackage definition.
(more…)

July 15, 2009

Updated script for fully local IPS mirror for faster DC and AI experimenting

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization, vmware — natiku @ 4:50 am

Updated script for fully local IPS mirror of selected packages for faster OpenSolaris 200906 DC or AI install Prototyping.
(more…)

July 8, 2009

OpenSolaris JeOS Prototype (Part6: Reduction Strategy – Scheme)

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization — natiku @ 7:21 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

(more…)

June 29, 2009

OpenSolaris JeOS Prototype (Part5: Reduction vs Minimalization)

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization — natiku @ 5:24 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

(more…)

June 26, 2009

Release: OpenSolaris 2008.11 JeOS Prototype

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization, vmware — natiku @ 6:59 am

Finally, OpenSolaris 2008.11 JeOS Prototype was released, see more in linked Chris blog entries:

OpenSolaris 2008.11 JeOS Prototype Released

I want to thanks you who helps me on this delivery, it was long, but very exciting experience.

There is also already a Virtual Template (Virtual Appliance) using this JeOS release, see more here:

Simplify Your Portal Deployment: Web Space Server 10 VM Template

June 19, 2009

Release: WebSpace images based on OpenSolaris 200811 JeOS

Filed under: cloud, jeos, ovf, virtualbox, Virtualization — natiku @ 2:30 am

Release: We just get out download for first Virtual Appliance with full WebSpace stack based on OpenSolaris 200811 JeOS, see more in Simplify Your Portal Deployment: Web Space Server 10 VM Template

May 28, 2009

OpenSolaris JeOS Prototype (Part4: Linux vs OpenSolaris)

Filed under: cloud, jeos, opensolaris, ovf, virtualbox, Virtualization, vmware — natiku @ 7:28 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

OpenSolaris design limitations and JeOS construction possibilities

(more…)

OpenSolaris JeOS Prototype (Part2: Design Basis)

Filed under: cloud, jeos, opensolaris, ovf, virtualbox, Virtualization, vmware — natiku @ 5:12 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

How we design and create OpenSolaris JeOS Prototype

(more…)

Virtualization Assitant Live-CD PoC (Proof Of Concept)

Filed under: cloud, Virtualization, virtual_appliances — natiku @ 3:53 am

Main page for Virtual Machines, Virtual Templates and Virtual Appliances Builder

Idea of building scalable builder is based on ideas and experience with simple builder service:

Virtual Appliance Build Service
Before full automation some more simple Proof of Concept project:

OpenSolaris 200906 Virtualization Assistant Live-CD Proof of Concept

Create a OpenSolaris 200906 Helper Live-CD Prototype with can help End Users and Developers to deliver faster VM Images/Templates/Appliances based on current mainline OpenSolaris 200906 release.
VA Live-CD will as PoC (Proof of Concept) demonstrate all known and needed steps of VM creation as modules or/and their recipes taking as a sample building process of OpenSolaris 200906 JeOS VM install and creation itself.

Content

  1. OpenSolaris 200906 Virtualization Assistant Live-CD PoC
  2. Project Motivations
  3. Target Audience of OpenSolaris 200906 Virtualization Assistant Live-CD Prototype
  4. Planned Functionality of OpenSolaris 200906 Virtualization Assistant Live-CD PoC
    1. Virtualization Assistant Live-CD PoC Deliverables: Media and Repository
      1. Virtualization Assistant Live-CD PoC Media Download
      2. Virtualization Assistant Live-CD PoC Mercurial repository
    2. VA Live-CD Functionality – Separation onto 2 sub-projects
    3. Content
    4. OpenSolaris 200806 Migration Assistant Live-CD
    5. OpenSolaris 200906 VA Live-CD Main Design Concepts
      1. AI Client in Live Media Based Rich Recovery Console
      2. Wrapping Functionality in “Modules”
      3. Modules are using Critical Check Points and Acummulated Return Values
      4. Overlays for delivering VA Live-CD, AI and Install framework Fast Fixes
      5. Include DC and all Build Recipe on Live-CD Media Itself
      6. Only Virtualization Platforms and x86 32bit support (and SPARC LDoms)
      7. Maximally Leverage OpenSolaris 200906 Distro Constructor
      8. Include Headless Mode with SERIAL port access (OS Kernel and Grub Menu)
      9. Include SSH key based authentication for better scripting
      10. Support for Alternate Install Scenarios: Fully Local Installation
      11. Support for Alternate Install Scenarios: ZFS Flash like install
      12. Setting up JeOS logins (not default OpenSolaris ones)
    6. Part 1: Building VA Live-CD Media with Distro Constructor
      1. VA Live-CD Media Distro Constructor Recipe
      2. VA Live-CD Media Distro Constructor Helper Files
      3. Customize VA Live-CD by Generating Clone from Live-CD
        1. Sample 1: Regeneration of VA Live-CD with Customizations (lofs)
        2. Sample 2: Generation of VA Live-CD from itself with added WiFi Intel …
      4. VA Live-CD media Costs and Sizes (Architectures Comparisons)
    7. Part 2: Virtual Assistant Live-CD Modules for VM Builders
      1. What are VA Live-CD modules and where they come from ?
      2. Module for testing main VA Live-CD functionality
        1. Selecting Best Strategy for Repeatable AI based JeOS Installations
      3. Module with common functionality
      4. Module for Local IPS Repository Recipe
      5. Module for Installing OpenSolaris 200906 JeOS
      6. Module for cleaning OS Runtime Data
      7. Module for HW arch change and HW Reconfiguration
      8. Module for securing installed OS instance
      9. Module shrinking disk with ZFS send/receive with 2 disks
      10. Module shrinking disk with ZFS send/receive with archive NFS
      11. Module for Virtual Hardware support
    8. VA Live-CD and JeOS Support for 10+ Most Popular Virtualization Platforms
      1. List of Know to Work Virtualization Platforms (x86 , x86-64)
      2. List of Know to Work Virtualization Platforms (SPARC SUN4V)
      3. HW Arch Check: xVM Hypervisor Para mode
      4. HW FAST FIX: VGIRUni network driver for Parallels
        1. Create local IPS repository on port 80
        2. Publish LOCALni into IPS repository
      5. HW FAST FIX: Update Dnet driver from B113
    9. Creating “instance” zpool for Live-CD custom data

OpenSolaris JeOS (Main Page)

Filed under: cloud, jeos, opensolaris, virtualbox, Virtualization, virtual_appliances, vmware — natiku @ 3:41 am

Main page for OpenSolaris JeOS (Just Enough Operating System) Prototypes related stuff.

News: Lightning Talk about OpenSolaris JeOS at Community One (1-Jun-09 2:40PM)

General Information – JeOS Prototype OpenSolaris project

   JeOS: Just enough OS Project Homepage

   OpenSolaris 2009.06 JeOS Prototype VM Images Download

   Discusion jeos-discuss@opensolaris.org (Main page)
   Discusion jeos-discuss@opensolaris.org (Archives)

10 Simple JeOS Prototype Usage Samples (Based on JeOS VM images)

I prepare in this blog 10 simple JeOS Prototype Usage Samples for your inspiration:

  1. Security related Enhancements in OpenSolaris JeOS Prototype
  2. JeOS like Zones in OpenSolaris JeOS Prototype
  3. NAS storage server in OpenSolaris JeOS Prototype
  4. C compile enviroment in OpenSolaris JeOS Prototype
  5. Personal SourceJuicer in OpenSolaris JeOS Prototype
  6. WebStack (Apache,MySQL,PHP) in OpenSolaris JeOS Prototype
  7. WebStack (Tomcat, MySQL, Java) in OpenSolaris JeOS Prototype
  8. Glassfish (Glasfish v2, MySQL, Java) in OpenSolaris JeOS Prototype
  9. Ruby Web Dev Env (Ruby Rack, MySQL, Ruby Rails) in OpenSolaris JeOS Prototype
  10. Minimal X env for iPKG GUI in OpenSolaris JeOS Prototype *
    1. Part 1: Minimal X env for iPKG GUI in OpenSolaris JeOS Prototype
    2. Part 2: Minimal X env for iPKG GUI in OpenSolaris JeOS Prototype
    3. Part 3: Minimal X env for iPKG GUI in OpenSolaris JeOS Prototype

 * Note: Adding minimal X environment will install in CLI JeOS Prototype a lot of GUI based components, but GUI functionality will be still limited to certain simple use cases.

General Information – Overview

Developers Corner – Implemetation

April 15, 2009

Amazon EC2 OpenSolaris re-bundling process trouble shutting

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 2:23 am

This entry is based on customer escalation, I hope it will help or at least inspire you in some extend too.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

(more…)

Glassfish 2.1 App Server and MySQL 5.1 AMI Pre and Post configurations

Filed under: amazon_aws, cloud, glassfish, opensolaris, Virtualization — natiku @ 1:42 am

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

(more…)

Glassfish 2.1 App Server and MySQL 5.1 AMI on OpenSolaris 2008.11

Filed under: amazon_aws, cloud, glassfish, opensolaris, Virtualization — natiku @ 1:15 am

We will create a MySQL 5.1 and Glassfish 2.1 developer profile bundle, we will run both applications as non-root user for higher security.
This time I will like to use as much as possible (re)configuration from Glassfish CLI management instead of direct editing Glassfish XML configuration files.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop


GlassFish/SJS AS in production – which bundle, which profile, …?

Specifics of OpenSolaris setup on Amazon EC2

Amazon AWS is designed for OS configurations, where instance admin login into instance as ROOT with SSH key, ROOT user don’t have password (is locked), so we can’t ‘sudo’ to it. This is imposing some limitations in non-root SW install when some tasks need to be done directly as root user due to known limitations of pfexec command.

Glassfish 2.1 AMI Targets on Amazon EC2

From past Glassfish on Solaris Amazon EC2 user feedback, most users are skilled developers who want to use AMI instances to porting their JAVA apps to Glassfish and/or EC2 Solaris platform. So in this Glassfish 2.1 AMI image we will focus on reasonable secure developer oriented installation in Cloud environment.

AMI creation side
  • Create Glassfish 21 user
  • Install Glassfish 2.1 as non-root user
  • Create basic SMF Glassfish integration
  • Add Glassfish tools to Glassfish user path
  • Allow Glassfish user to control Glassfish SMF service
  • Secure admin to use SSL and bind to ‘localhost’ only
  • Tune Glassfish 2.1 memory usage
  • Clean install data and logs
AMI deployment side
  • User will change Glassfish admin password
  • User will generate new SSL key
  • Optionaly: User will open admin domain to all public IPs, so it can be accessed by WEB
  • User will restart Glassfish 2.1 to load new installation

Create MySQL 5.1 AMI-752CCB1C instance and install there GF 2.1

Use pre-created AMI with MySQL 5.1 AMI-752CCB1C

Check snapshots

zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/opensolaris@install   140M      -  2.65G  -
zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
rpool                   4.07G  5.53G    72K  /rpool
rpool/ROOT              3.21G  5.53G    18K  legacy
rpool/ROOT/opensolaris  3.21G  5.53G  3.07G  /
rpool/dump               293M  5.53G   293M  -
rpool/export              56K  5.53G    19K  /export
rpool/export/home         37K  5.53G    37K  /export/home
rpool/swap               586M  6.10G    16K  -
root@jsc-xen-14:~# zfs list -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/opensolaris@install   140M      -  2.65G  -
zfs destroy rpool/ROOT/opensolaris@install
zfs list
NAME                     USED  AVAIL  REFER  MOUNTPOINT
rpool                   3.93G  5.66G    72K  /rpool
rpool/ROOT              3.07G  5.66G    18K  legacy
rpool/ROOT/opensolaris  3.07G  5.66G  3.07G  /
rpool/dump               293M  5.66G   293M  -
rpool/export              56K  5.66G    19K  /export
rpool/export/home         37K  5.66G    37K  /export/home
rpool/swap               586M  6.24G    16K  -

Check PKG IPS setup

1. Check if image is cleaned

du -s -h /var/pkg/download/
34M     /var/pkg/download/
du -s -h /var/pkg/index/
36M     /var/pkg/index/

2. Check if PKG IPS is set up to auto clean cache

No, set it

pkg property -H flush-content-cache-on-success
flush-content-cache-on-success False
pkg set-property flush-content-cache-on-success True

Install JDK6 from OpenSolaris release repo

pkg install SUNWj6dev

Install ANT from OpenSolaris release repo

pkg install SUNWant

Install MySQL 5.1 and J Connector

1. We will use AMI with MySQL 5.1, until this version will be in official OpenSolaris REPO

Use pre-created AMI with MySQL 5.1 AMI-752ccb1c

2. Install Mysql Connector/J 5.1

Note: We will use version 5.1 from official OpenSolaris REPO

pkg install SUNWmysql5jdbc

Glasshish 2.1 Install from JAR distribution as non-root user

GlassFish Project – v2.1 FinalBuild

The Open Sourcing Clustering features are included in this promotion.

Create non-root runtime user (account locked by default)

groupadd gf21
useradd -d /export/home/gf21 -m -s /usr/bin/bash -g gf21 gf21

Note: User will don’t have enough privileges to start/stop GF service, I consider to add to it profile , see separate section for it

1. Install glassfish 2.1

mkdir /opt/gf21; chown gf21:gf21 /opt/gf21
su - gf21
cd /opt/gf21
wget  http://java.net/download/javaee5/v2.1_branch/promoted/SunOS_X86/glassfish-installer-v2.1-b60e-sunos_x86.jar
java -Xmx256m -jar glassfish-installer-v2.1-b60e-sunos_x86.jar
Accept license with "A"
Installation will by unpacked in ./glassfish

2. Configure glassfish 2.1 (Create domain1)

cd /opt/gf21/glassfish
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml
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] ------ Using Profile [developer] to create the domain ------
....
[exec] Security Store uses: JKS
[exec] Domain domain1 created.
[exec] Login information relevant to admin user name [admin] for this domain [domain1] stored at
[/export/home/gf21/.asadminpass] successfully.

3. Backup original domain1 configuration

cp /opt/gf21/glassfish/domains/domain1/config/domain.xml /opt/gf21/glassfish/domains/domain1/config/domain.xml.org

4. Put glassfish tools into path

echo export PATH=$PATH:/opt/gf21/glassfish/bin >>~/.profile
exit
su - gf21

5) Create minimal Glassfish SMF script for automatic start / stop

How to Create a Service Management Facility (SMF) Manifest

cat >/opt/gf21/smf-glassfish.xml <<EOF
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='glassfish:domain1'>
<service name='application/glassfish/domain1' type='service' version='1'>
<create_default_instance enabled='true' />
<single_instance />
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service' />
</dependency>
<method_context>
<method_credential user='gf21'  group='gf21' />
</method_context>
<exec_method type='method' name='start' exec='/opt/gf21/glassfish/bin/asadmin start-domain domain1' timeout_seconds='600' />
<exec_method type='method' name='stop' exec='/opt/gf21/glassfish/bin/asadmin stop-domain domain1' timeout_seconds='600' />
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='transient' />
</property_group>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>Glassfish V2.1 Simple non-root user SMF</loctext>
</common_name>
</template>
</service>
</service_bundle>
EOF

6. Load SMF this XML definition and start service

Execute as root, pfexec as gf21 fail on these ?
exit
whoami
root
/usr/sbin/svccfg validate /opt/gf21/smf-glassfish.xml
/usr/sbin/svccfg import /opt/gf21/smf-glassfish.xml
/usr/sbin/svcadm enable svc:/application/glassfish/domain1:default
svcs /application/glassfish/domain1
STATE          STIME    FMRI
online*        12:50:01 svc:/application/glassfish/domain1:default
Wait after is service is online
svcs /application/glassfish/domain1
online         12:05:29 svc:/application/glassfish/domain1:default

7. Add line to create authorization into auth_attr

Good Article: Less known Solaris features: RBAC and Privileges
Part 1: Introduction
Part 2: Role based access control
Part 3: Privileges

as root
echo "solaris.smf.manage.glassfish/domain1:::Glassfish Domain1 Server management::" >> /etc/security/auth_attr

8. Add service authorization to user gf21

usermod -A solaris.smf.manage.glassfish/domain1 gf21

9. Add authorization to restart and manage service

svccfg -s glassfish/domain1 setprop general/action_authorization=astring: 'solaris.smf.manage.glassfish/domain1'
svccfg -s glassfish/domain1 setprop general/value_authorization=astring: 'solaris.smf.manage.glassfish/domain1'
svcadm refresf glassfish/domain1

10. Secure default instance domain1 admin interface by using SSL and localhost

su - gf21
asadmin get  server.http-service.http-listener.admin-listener.address
server.http-service.http-listener.admin-listener.address = 0.0.0.0
asadmin set server.http-service.http-listener.admin-listener.address=127.0.0.1
asadmin  get server.http-service.http-listener.admin-listener.security-enabled
server.http-service.http-listener.admin-listener.security-enabled = false
asadmin  set server.http-service.http-listener.admin-listener.security-enabled=true

11. Optional: Tuning Glassfish configuration for Amazon EC2 c1.small

Tune JVM HEAP memory in /opt/glassfish/domains/domain1/config/domain.xml,
Amazon AWS m1.small which have 1700MB RAM, so for Solaris for JeOS we can put there 1024MB
(But we need to keep in mind also memory needs of MySQL and ZFS ARCH chache ?)

Chane Java Heap memory from 512M to 1024M

asadmin  create-jvm-options --  "-Xmx1024m"
cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx
<jvm-options>-Xmx512m</jvm-options>
<jvm-options>-Xmx1024m</jvm-options>
asadmin delete-jvm-options -- -Xmx512m
cat /opt/gf21/glassfish/domains/domain1/config/domain.xml | grep Xmx
<jvm-options>-Xmx1024m</jvm-options>

Note: c1.small have only one CPU, do we need optimize threads , need to be investigated together with MySQL setup needs

12. Restart glassfish SMF service

Execute as root, pfexec as gf21 fail on these ? Most work NOW !
exit
whoami
root
/usr/sbin/svcadm disable -t svc:/application/glassfish/domain1:default
/usr/sbin/svcadm enable svc:/application/glassfish/domain1:default
svcs /application/glassfish/domain1
STATE          STIME    FMRI
online*        12:50:01 svc:/application/glassfish/domain1:default
svcs /application/glassfish/domain1
online         12:05:29 svc:/application/glassfish/domain1:default

13. Check running GF2.2 running instance under gf21:gf21 (Still under root)

ps -ef |grep gf21
gf21 16270     1   0 08:20:29 ?           0:42 /usr/jdk/instances/jdk1.6.0/jre/../bin/java -Dcom.sun.aas.instanceRoot=/opt/gf2
svcs glassfish/domain1
STATE          STIME    FMRI
online          8:21:12 svc:/application/glassfish/domain1:default
svcs -l glassfish/domain1 | grep logfile
lofile /var/svc/log/application-glassfish-domain1:default.log
tail  /var/svc/log/application-glassfish-domain1:default.log
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.
netstat -an | egrep "8080|8181|4848|3700|3820|3920|8686"
*.3700               *.*                0      0 49152      0 LISTEN
*.3820               *.*                0      0 49152      0 LISTEN
*.3920               *.*                0      0 49152      0 LISTEN
*.8686               *.*                0      0 49152      0 LISTEN
*.8080               *.*                0      0 49152      0 LISTEN
*.8181               *.*                0      0 49152      0 LISTEN
127.0.0.1.4848         *.*                0      0 49152      0 LISTEN
*.3700               *.*                0      0 49152      0 LISTEN
*.3820               *.*                0      0 49152      0 LISTEN
*.3920               *.*                0      0 49152      0 LISTEN
*.8686               *.*                0      0 49152      0 LISTEN
*.8080               *.*                0      0 49152      0 LISTEN
*.8181               *.*                0      0 49152      0 LISTEN

September 11, 2008

AMI simple deployment: OpenSolaris 2008.05-91 Glassfish and MySQL AMI image

Filed under: amazon_aws, cloud, glassfish, opensolaris, Virtualization — natiku @ 5:51 am

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
  1. 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

  1. Select Glassfish distribution (I select simple devel one)
https://glassfish.dev.java.net/downloads/v2ur2-b04.html
  1. Get Glassfish install JAR
wget http://www.java.net/download/javaee5/v2ur2/promoted/SunOS_X86/glassfish-installer-v2ur2-b04-sunos_x86-ml.jar
  1. 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
  1. 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

May 22, 2008

Pre-build OpenSolaris 2008.05 JeOS RNJS AMI images

Filed under: amazon_aws, cloud, glassfish, opensolaris, Virtualization — natiku @ 5:42 am

For creating of pre-build PUBLIC OpenSolairs AMIs I select Glassfish MySQL and WebStack AMP bundles, they are very easy to deploy and configure so they are ideal for Virtual Appliances as PoC (Proof-of-Concept) software.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

AMI Net Install Image: os200805 JeOS + Glassfish & MySQL or AMP stack

ami-0d50b564 aki-7846a311 ari-7d46a314 sun-osol/2008.05_JeOS_32_1.0.img.manifest.xml

In fact this an another example how composite image can be created, this time I will use IPS net based install from default OpenSolaris repository.

Advanced ec2ify: ssh_indent_key + data disks formated with ZFS and mounted /mnt, user-data, updater, syncer

<p
See install steps bellow:
Get & Inst: Net based install of IPS packages into OpenSolaris 2008.05

Get & Inst: Net based install of IPS packages into OpenSolaris 2008.05

Filed under: amazon_aws, cloud, glassfish, ips, opensolaris, Virtualization — natiku @ 5:28 am

In fact this an another example how composite image can be created, this time I will use IPS net based install from default OpenSolaris repository.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

New IPS packaging system

(more…)

May 21, 2008

Local xVM / XEN environment as main development tool

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 8:02 am

Amazon EC2 is based on XEN hypervisor, AMI runs as DomU so any OS with XEN hypervisor implementation as popular Linux distributions, OpenSolaris Nevada and Indiana lines can be used for emulating Amazon EC2 environment for faster local development.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

Because users don’t have access to Kernel/Ramdisk, they are located in Dom0 on RO mode. many issues with getting them before boot with PyGRUB from DomU image don’t apply, especially where OpenSolaris images with UFS or ZFS root is used in Linux based Dom0.

You can use rebundling process on Amazon EC2 for fast initial AMI creations, later you can download your private AMIS locally and unbundle (split into one image and decode) them. This is why it is good in process of rebudling set your password to root user, so you can after access image locally with console.

If you plan to run Linux based Dom0 is also good to get Kernel/Ramdisk images from running instance. t. m. save /platform dir with ssh.

I prepared XEN DomU OpenSolaris JeOS RNJS archives, its planned as Optional Feature Download, if somebody of you is experienced with XEN Hypervisor and will like try local development. Ask on Beta program email alias to get access to them.

ec2ify:me 5 optional steps to parametrize instance

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 5:30 am

Based on my previous Linux on Amazon AWS experience I define 5 optional Solaris ec2ify steps:

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

(more…)

ec2ify:ident 5 required steps to login into instance

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 4:51 am

Based on my previous Linux on Amazon AWS experience I define 5 required Solaris ec2ify steps:

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

(more…)

May 20, 2008

Getting sense of ephemeral store behavior under OpenSolaris (UFS,ZFS)

Filed under: amazon_aws, cloud, opensolaris, Virtualization, zfs — natiku @ 3:15 am

To get impression of ephemeral store behavior under OpenSolaris (UFS,ZFS) I use bonnie++, compiled from source with debug output. Pre-compiled binary can be get from [www.sunfreeware.com SunFreeware]

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop

I will skip file based tests and use large file pool test only with size configuration more then 2x of instance memory, because main purpose of test is evaluate “Amazon EC2 documented ephemeral storage feature fist access can be significantly slower “.

(more…)

May 19, 2008

Will OpenSolaris 2008.05 instance survive reboot after update ?

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 7:55 am

New OpenSolaris 2008.05 utilize ZFS root and use ZFS clones for system updates with IPS net based repository, it’s counts on ability of reboot OS instance into new environment.

This entry is part of ‘OpenSolaris on Amazon EC2′ Workshop

Will OpenSolaris 2008.05 OS survive reboot after update ? Yes !!!

(more…)

Porting Solaris to Amazon AWS (EC2,S3) – need for ec2ify scripts

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 5:18 am

We need scrips to support specific features of Amazon AWS (EC2,S3), yes, we need ec2ify our Solaris instances.

This entry is part of ‘OpenSolaris on Amazon EC2′ Workshop

Bellow I will demonstrate some ec2ify functionality, however main purpose of them is to demonstrate ec2ify process and issues, rather then make perfect suit all script(s).

I will create this ec2ify functionality:

  • ec2ify/ident To be able access created Solaris instance on Amazon AWS, we need to add ability to load user SSH key-pair.
  • ec2ify/me Optionally we can create simple instance parametrization and customizable on boot update / on shutdown backup functionality

Both ec2ify services will be created as Solaris SMF services so we can make they depend on other services, see more about Solaris SMF in Predictive Self-Healing – Bigadmin home of SMF

Note: This stuff will sit in /opt/ec2ify directory, SMF services will start with ec2ify name

Amazon AWS (EC2,S3) environment Overview

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 4:32 am

Amazon AWS represent Utility on demand , Pay as you go concepts, Amazon AWS is also known as Highly Scalable, developer oriented, Web Platform build on XEN hypervisor technology.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop
(more…)

Popular Amazon AWS (EC2,S3) programming LIBraries

Filed under: amazon_aws, cloud, opensolaris, Virtualization — natiku @ 4:10 am

Amazon APIs used network based protocols so they consumers are highly portable and are implemented in most popular programing languages as rich full libraries. classes or modules.

This entry is part of ‘OpenSolaris on Amazon EC2′ workshop
(more…)

May 16, 2008

Download & Run: WebSynergy – Demonstrating AMI update from ZIP on S3

Filed under: amazon_aws, cloud, glassfish, opensolaris, Virtualization — natiku @ 2:06 pm

In this type of AMI image use, I will send a control data in form of ZIP file to AMI on instance start which will download from S3 prepackaged and zipped application stack, this way we don’t need to rebuild AMI and we can update it on boot time.

This entry is part of ‘OpenSolaris on Amazon EC2′ Workshop
(more…)

Inst&Conf: SGMJ (Solaris Glassfish MySQL Java) Stack

Filed under: amazon_aws, cloud, glassfish, Virtualization — natiku @ 4:15 am

For now it is just JIT (Just Install software) Virtual Appliance, developers will post-configure it using DOCs

This entry is part of ‘OpenSolaris on Amazon EC2′ Workshop
(more…)

May 15, 2008

Inst&Conf: Liferay 5.0 on Glassfish bundle DEMO

Filed under: amazon_aws, cloud, glassfish, opensolaris, Virtualization — natiku @ 9:05 am

Installation of Liferay Glassfish bundle DEMO is easy and is identical to install of empty Glassfish.

This entry is part of ‘OpenSolaris on Amazon EC2′ Workshop
(more…)

« Newer PostsOlder Posts »

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: