Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

    DEPLOY_ALFRESCO_USER is the username (from 13a.) for the Alfresco account with read access to the web project to be deployed (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")

---

 That's it for now.

...

----

Okay, Brian performed steps 1 through 12 on Alumni's server (cms-prod-wcm1.mit.edu) and set up a remote web server (cms-test-wcm1.mit.edu) with tomcat (actually a SASH stack), and gave me root access.  Here's what I did.

ON CMS-PROD-WCM1:

1) I had to make sure all .sh files were executable and in UNIX format, since they came from a Windows box.   (This step should be unnecessary if I fix the tarball)

Code Block

  cd /home/repos/alfresco; for a in `find -name \*.sh`; do chmod a+x $a; dos2unix $a; done

2) I generated a strong password for admin and edited /home/repos/alfresco/virtual-tomcat/conf/alfresco-virtserver.properties to set "alfresco.server.password" to this value. 

Wiki Markup
3) I created $ALF_EXT/custom-authority-services-context.xml (copied from version in /root) and added <value>jcalz_admin</value> to the admin list.&nbsp; \[NOTE: an older version of this file had a bean definition which caused a circular reference here.&nbsp; The new version is correct.&nbsp; In general, this file should be copied out of authority-services-context.xml in the alfresco WAR file before it is edited\]

4) Created the logs directories for tomcat and virtual tomcat.  (Apparently the tomcat startup scripts get upset if the directories aren't there.  This step should be unnecessary if I fix the tarball)

Code Block

mkdir tomcat/logs; mkdir virtual-tomcat/logs

5) I edited $ALF_EXT/web-client-confix-custom.xml and changed the <deployment> element to include

Code Block

    <commands>
         <command name="deploy-to-cms-test-wcm1" program="bash">
                       <param>-c</param>
                       <param>${ALF_HOME}/deploy/deploy-to-cms-test-wcm1.sh</param>
                   </command>
         </commands>

6) I copied $ALF_HOME/deploy/deploy.sh to $ALF_HOME/deploy/deploy-to-cms-test-wcm1.sh

7) I generated a strong password for an Alfresco "deploy_bot" account.

8) I ran "ssh-keygen -t dsa" and accepted the default location and left the passphrase blank.

9) I copied the generated public key file to cms-test-wcm1

Code Block

scp ~/.ssh/id_dsa.pub cms-test-wcm1:

10) I logged into the remote server as root:

Code Block

ssh -l root cms-test-wcm1

ON CMS-TEST-WCM1:

11) I did:

Code Block

 adduser deploy_bot;  (note, this is the WEB SERVER "deploy_bot" account, not the ALFRESCO "deploy_bot" account)
 mkdir /home/deploy_bot/.ssh;
 chown deploy_bot /home/deploy_bot/.ssh;
 chmod 700 /home/deploy_bot/.ssh;
 cat ~/id_dsa.pub >> /home/deploy_bot/.ssh/authorized_keys
 chown deploy_bot /home/deploy_bot/.ssh/authorized_keys;
 chmod 600 /home/deploy_bot/.ssh/authorized_keys;
 rm ~/id_dsa.pub

12) I ensured that the deploy_bot account had write access to the deployment destination path:

Code Block

 chmod a+rx /home/www
 chmod a+rx /home/www/sash-server
 chmod a+rx /home/www/sash-server/servers/
 chmod a+rx /home/www/sash-server/servers/alumni/
 chown deploy_bot /home/www/sash-server/servers/alumni/webapps
 chown deploy_bot /home/www/sash-server/servers/alumni/webapps/ROOT
 

(There may be better ways of doing this, but this shouldn't be a big deal)

13) I logged out of cms-test-wcm1

ON CMS-PROD-WCM1:

14) I tried "ssh -l deploy_bot cms-test-wcm1.mit.edu" and accepted the host key.  (This step stores the host key in known_hosts and is actually important, since you don't want the deployment script to be prompted to accept or not accept the host key.)

15) I edited "$ALF_HOME/deploy/deploy-to-cms-test-wcm1.sh" and set:

Code Block

 
 export DEPLOY_ALFRESCO_USER=deploy_bot
 export DEPLOY_ALFRESCO_PASSWORD=[Strong password from step 7]
 export DEPLOY_REMOTE_SERVER=cms-test-wcm1.mit.edu
 export DEPLOY_REMOTE_USER=deploy_bot
 export DEPLOY_REMOTE_DESTPATH=/home/www/sash-server/servers/alumni/webapps/ROOT

16) I went into $ALF_HOME and did ./alfresco.sh start, and waited for the server to come up.

FROM THE WEB BROWSER:

17) I logged into http://cms-prod-wcm1.mit.edu:8080/alfrescoImage Added, with the admin/admin password

18) I went into User Management and set the admin account password to the strong password from step 2.

19) I created the deploy_bot account, and set its password to the strong password from step 7.

20) I created the jcalz_admin account, and set its password to my desired password.

21) I logged out as admin and back in as jcalz_admin

22) I created a Web Project and specified "command:deploy-to-cms-test-wcm1" as the deploy destination, and copied some stuff into it, and took a snapshot.

23) I tested deployment: success!