Re: New installation fail?
Re: New installation fail?
- Subject: Re: New installation fail?
- From: Jesse Tayler via Webobjects-dev <email@hidden>
- Date: Tue, 1 Sep 2020 13:04:22 -0400
Well, it seems I was able to find some decade old scripts that had a LOT of
important things in them all working at one time.
This fails in several ways like not finding this public S3 bucket or
dependencies and I figure other folks must rely on EC2/S3
I can make sure I script out whatever I eventually get working for it but me
thinks other folks are using something else or maintaining their instances
another way?
#!/bin/bash
### All userdata scripts should include this section ###
### -----------8<---------- ###
yum -y install make
# Install WebObjects deployment environment
echo "Installing the WebObjects deployment environment"
wget http://webobjects.s3.amazonaws.com/wo-install.sh -O /wo-install.sh
chmod 775 /wo-install.sh
/wo-install.sh
# Next we install s3 command line tools (http://timkay.com/aws/).
# We need these to enable us to fetch stuff from private s3 buckets.
echo "s3get is not installed so installing it now"
# Fetch the aws cli tool
curl -L github.com/timkay/aws/raw/master/aws -o aws
# Install the aws cli tool
perl aws --install
# Create an .awssecret file
touch /root/.awssecret
cat >> /root/.awssecret << END
ITWASANOLDCODEANYWAY
THISISNOTTHEREALCODEBUTTHEREISANS3KEY/wsYB544
END
### -----------8<---------- ###
# Add a helloworld user. The default user is appserver, which might suffice for
your needs. We
# run each cluster of servers as a specific named user as we load properties
(using ERXProperties)
# on a per-cluster basis.
echo "Adding a helloworld user to the appserveradm group"
useradd -g appserveradm helloworld
# Change the user in the WebObjects init.d script
echo "Changing the user who runs WebObjects services to helloworld"
cd /etc/init.d/
sed --in-place=.backup 's/USER=appserver/USER=helloworld/g' webobjects
# Fix the permissions
echo "Fixing permissions"
chmod 755 /etc/init.d/webobjects
# Fix user and group
echo "Fixing users and groups"
chown -R helloworld:appserveradm /opt/WOApplications
chown -R helloworld:appserveradm /opt/WOWebServerResources
chown -R helloworld:appserveradm /opt/WODeployment
# Wait for 10 seconds to ensure that the user and group changes have propogated
echo "Wait for 10 seconds to ensure that the user and group changes have
propogated"
sleep 10
# Restart WO services
echo "Starting WebObjects services"
/etc/init.d/webobjects start
# Wait for 30 seconds to ensure that WebObjects services have booted before
continuing
echo "Wait for 30 seconds to ensure that WebObjects services have booted before
continuing"
sleep 30
# Add a host
echo "Adding a host"
curl -X POST -d "{id: '127.0.0.1',type: 'MHost', osType: 'UNIX',address:
'127.0.0.1', name: '127.0.0.1'}"
http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mHosts.json
# Configure the WOAdaptorURL
echo "Configuring the WOAdaptorURL in Java Monitor"
curl -X PUT -d "{woAdaptor:'http://prod.clicktravel.com/apps/WebObjects'}"
http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json
# Fetch and run our install dependencies script. We fetch this from the public
webobjects s3 bucket.
echo "Fetch and run the helloworld server installation dependencies script"
touch /helloworld-deps-install.sh
s3get webobjects/helloworld-deps-install.sh /helloworld-deps-install.sh
chmod 775 /helloworld-deps-install.sh
/helloworld-deps-install.sh
# Fetch and run our apps install script. We fetch this from the public
webobjects s3 bucket.
echo "Fetch and run our helloworld server application install script"
touch /helloworld-install.sh
s3get webobjects/helloworld-install.sh /helloworld-install.sh
chmod 775 /helloworld-install.sh
/helloworld-install.sh
# Configure the WOAdaptorURL and password
echo "Configuring the password in Java Monitor"
curl -X PUT -d "{password:'wonderful'}"
http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json
sudo ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime
echo "Job done!"
> On Sep 1, 2020, at 1:00 PM, Theodore Petrosky <email@hidden> wrote:
>
> All of my experiments revolved around compiling everything on the target
> machine.
>
> I will look around for the link, but there is a section that has an installer
> script that is quite awesome.
>
> Give me a little to look around.
>
> Ted
>
>> On Sep 1, 2020, at 11:45 AM, Jesse Tayler <email@hidden> wrote:
>>
>>
>> I'm launching a new EC2 Instance and just installing from scratch and I
>> found my way to this page
>>
>> https://wiki.wocommunity.org/display/documentation/Installing+a+deployment+environment+on+RedHat,+CentOS+or+Amazon+Linux
>>
>> These WO installs all have bad links or dead services?
>>
>> sudo yum install wotaskd
>> sudo yum install womonitor
>> sudo yum install woadaptor
>>
>>
>> I notice there’s stuff here
>>
>> https://packages.wocommunity.org/CentOS/latest/i386/
>>
>> I'm not even certain I recall what CentOS is, I’m apparently on Amazon Linux
>> 2
>>
>> Ok, so what’s the latest working method for updating an EC2 instance?
>>
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden