...
13. Configure the deployment script and remote (deployed-to)d server server. This is very dependent on the configuration of the remote server, which we don't necessarily know. It may require more extensive changes to the script, if the remote server isn't what we expect. Skip If so, skip this step or pass it on to someone who knows how to do this (e.g., Joe).knows more about the remote server.
13a. Identify or create an Alfresco deployment user which has read access to the web project to be deployed. (This requires that the user has a sandbox in the web project as at least a Content Reviewer). Note the Alfresco username and password of this user.
13b. On the remote serverremote (linux) server, identify or create a remote user with write access to the desired deployment destination path. Ensure that the root account on the Alfresco server can ssh as this user to the remote server without being prompted for a password. If this is not already set up, you should do the following:
- On the Alfresco server as root, run "ssh-keygen -t dsa" and accept the default location. Also, leave the passphrase blank (maybe not the best advice but I want to ensure that the script will not be prompted for a password)
- Copy the generated public key file (~/.ssh/id_dsa.pub) to the remote server (e.g., "scp ~/.ssh/id_dsa.pub REMOTESERVER:")
- Log into the remote (assumed linux) server as the remote user. (If the user doesn't exist, first log in as root and create the account with "adduser USERNAME")
- If it does not exist, create the remote user's .ssh directory and make sure its permissions are properly set. ("mkdir ~/.ssh" and "chmod 700 ~/.ssh")
- Append the generated public key file you copied to the end of .ssh/authorized_keys, and make sure its permissions are properly set. ("cat id_dsa.pub >> ~/.ssh/authorized_keys" and "chmod 600 ~/.ssh/authorized_keys")
- Remove the generated public key file from the remote server ("rm id_dsa.pub")
- Log out of the remote server
- Test by logging into the Alfresco server as root and running "ssh -l USERNAME REMOTESERVER". If you get in as the remote user without being prompted for a password, congratulations.
...
13b13c. Edit ${ALF_HOME}/deploy/deploy.sh
There are four environment variables we care about.
DEPLOY_REMOTE_SERVER is the fully qualified hostname of the remote machine to which you want to deployserver. (e.g., "export DEPLOY_REMOTE_SERVER=isda-ist1.mit.edu")
TOMDIR is DEPLOY_REMOTE_USER is the username (from 13b.) of an account on the remote server with passwordless ssh login access. (e.g., "export DEPLOY_REMOTE_USER=deploy_bot")
DEPLOY_REMOTE_DESTPATH is the path to the directory on the remote machine to which you want to deploy. (e.g., "export TOMDIRDEPLOY_REMOTE_DESTPATH=/home/apache-tomcat-5.5.23/webapps/ROOT")
DEPLOY_USER is both the username ALFRESCO_USER is the username (from 13a.) for the Alfresco account with read access to the web project to be deployed , and the username of an account on the remote server with passwordless ssh login access. (e.g., "export DEPLOY_ALFRESCO_USER=deploy_bot")
DEPLOY_PASSWORD is the Alfresco password for the DEPLOY_ALFRESCO_USER user. (e.g., "export DEPLOY_PASSWORD=deploy_bot_password_or_something")
13b. As root, install the proper id_dsa.pub in the ~/.ssh directory... the one corresponding to ${DEPLOY_USER}@${DEPLOY_SERVER}.
13c. Uh, er, make sure, on the remote server, that DEPLOY_USER is in /etc/passwd, and in the user's .ssh directory, the proper info is in the authorized_keys file.
---
That's it for nowI WILL HAVE TO CLEAN THIS UP.