Skip to content

Setting Up A Template Server

jappy edited this page Oct 26, 2011 · 2 revisions

Template Server Health Check Url

Template Server Admin Console

Custom Symbolically Linked Directories on the Template Server

Elastic Beanstalk and the New Amazon Linux API's only allow you to login as ec2-user. You can no long scp into any directory other than home. It is for this reason that the following symbolic links have been created.

[ec2-user@domU-12-31-39-12-34-56 ~]$ pwd
/home/ec2-user
[ec2-user@domU-12-31-39-12-34-56 ~]$ ls -lag
total 40
drwx------ 4 ec2-user 4096 Oct 12 10:26 .
drwxr-xr-x 3 root     4096 Nov 30  2010 ..
drwxrwxr-x 3 ec2-user 4096 Oct 12 09:57 archive
-rw------- 1 ec2-user 1162 Oct  9 04:07 .bash_history
-rw-r--r-- 1 ec2-user   18 Oct 29  2010 .bash_logout
-rw-r--r-- 1 ec2-user  176 Oct 29  2010 .bash_profile
-rw-r--r-- 1 ec2-user  124 Oct 29  2010 .bashrc
drwx------ 2 ec2-user 4096 Oct  7 11:39 .ssh
lrwxrwxrwx 1 ec2-user   41 Oct  9 04:16 templates -> /usr/share/tomcat6/webapps/ROOT/templates
-rw------- 1 ec2-user 6785 Oct 12 10:26 .viminfo
lrwxrwxrwx 1 ec2-user   26 Oct  9 04:15 webapps -> /usr/share/tomcat6/webapps

SCP and S3 sources

SCP

SCP sources directories on template server:

/home/ec2-user/templates/scp_source/native
/home/ec2-user/templates/scp_source/shared

These sources are then made available as template sources using the template server here:

http://templates.mydomain.com/templates/scp_source/native http://templates.mydomain.com/templates/scp_source/shared

Therefore the path set inside the TeaServlet config should be (Note the use of internal EC2 address, this will prevent you from having to pay for bandwidth between your TeaServlet and your template server.):

<path>
http://domU-12-31-39-12-35-56.compute-1.internal/templates/scp_source/native;
http://domU-12-31-39-12-35-56.compute-1.internal/templates/scp_source/shared
</path>

S3

The directory on the template server is here:

/home/ec2-user/templates/s3_source/native
/home/ec2-user/templates/s3_source/shared

These sources are then made available as template sources using the template server here:

Therefore the path set inside the TeaServlet config should be (Note the use of internal EC2 address, this will prevent you from having to pay for bandwidth between your TeaServlet and your template server.):

<path>
http://domU-12-31-39-12-35-56.compute-1.internal/templates/s3_source/native;
http://domU-12-31-39-12-35-56.compute-1.internal/templates/s3_source/shared
</path>

Accessing Template Server Across Availability Zones.

If in a different availability zone the template path setup inside the teaservlet config is:

<path>
http://templates.mydomain.com/templates/scp_source/native;
http://templates.mydomain.com/templates/s3_source/native;
http://templates.mydomain.com/templates/scp_source/shared;
http://templates.mydomain.com/templates/s3_source/shared
</path>