Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Eclipse Server Sandbox Setup"
m (formatting) |
|||
Line 5: | Line 5: | ||
You will need to be root for most of the steps below. | You will need to be root for most of the steps below. | ||
− | == /etc/hosts == | + | === /etc/hosts === |
To make your local machine think it's eclipse.org add this line to '''<code>/etc/hosts</code>''': | To make your local machine think it's eclipse.org add this line to '''<code>/etc/hosts</code>''': | ||
Line 11: | Line 11: | ||
127.0.1.1 www.eclipse.org download.eclipse.org eclipse.org | 127.0.1.1 www.eclipse.org download.eclipse.org eclipse.org | ||
− | == Apache2 configuration == | + | === Apache2 configuration === |
Add something like the following into your apache config file, '''<code>/etc/apache2/sites-available/default</code>''': | Add something like the following into your apache config file, '''<code>/etc/apache2/sites-available/default</code>''': | ||
Line 26: | Line 26: | ||
</VirtualHost> | </VirtualHost> | ||
− | == Create vhost directories == | + | === Create vhost directories === |
Create the directories from which you'll be serving the spoofed content: | Create the directories from which you'll be serving the spoofed content: | ||
Line 33: | Line 33: | ||
mkdir -p /var/www/download.eclipse.org/htdocs | mkdir -p /var/www/download.eclipse.org/htdocs | ||
− | == Restart Apache2 == | + | === Restart Apache2 === |
apache2ctl restart | apache2ctl restart | ||
Line 39: | Line 39: | ||
/etc/init.d/apache2 restart | /etc/init.d/apache2 restart | ||
− | == Phoenix content == | + | === Phoenix content === |
Extract eclipse.org-common from CVS and put it in the root of your webserver: | Extract eclipse.org-common from CVS and put it in the root of your webserver: | ||
Line 51: | Line 51: | ||
cd /var/www/download.eclipse.org/htdocs/; ln -s /var/www/eclipse.org-common; \ | cd /var/www/download.eclipse.org/htdocs/; ln -s /var/www/eclipse.org-common; \ | ||
− | == Web content == | + | === Web content === |
You can checkout the content from CVS and put it into the htdocs folders, or you can check out the content in Eclipse and symlink your checked out projects from the htdocs folder. | You can checkout the content from CVS and put it into the htdocs folders, or you can check out the content in Eclipse and symlink your checked out projects from the htdocs folder. | ||
− | === Checkout directly === | + | ==== Checkout directly ==== |
This is handy for maintaining a mirror server (eg., an internal build server which contains the same files as on download.eclipse.org). Changes you make to code - once committed back to CVS - can be updated running <code>cvs update</code> in the htdocs folder. This can be run as a cronjob at some regular interval. | This is handy for maintaining a mirror server (eg., an internal build server which contains the same files as on download.eclipse.org). Changes you make to code - once committed back to CVS - can be updated running <code>cvs update</code> in the htdocs folder. This can be run as a cronjob at some regular interval. | ||
Line 71: | Line 71: | ||
cvs -d :ext:''username''@dev.eclipse.org:/cvsroot/org.eclipse -Q ci "''emf/somefile.php''" -m "[bug#] some commit comment" | cvs -d :ext:''username''@dev.eclipse.org:/cvsroot/org.eclipse -Q ci "''emf/somefile.php''" -m "[bug#] some commit comment" | ||
− | === Symlink workspace projects === | + | ==== Symlink workspace projects ==== |
This is handy for sandbox testing of code changes on your local workstation. Every change you make in Eclipse to your code will immediately be reflected on your local webserver. | This is handy for sandbox testing of code changes on your local workstation. Every change you make in Eclipse to your code will immediately be reflected on your local webserver. | ||
Line 82: | Line 82: | ||
ln -s ~/workspace/emf-home/_projectCommon.php | ln -s ~/workspace/emf-home/_projectCommon.php | ||
− | == Vhost directory listings == | + | === Vhost directory listings === |
− | === www.eclipse.org === | + | ==== www.eclipse.org ==== |
'''#''' ''ls -lA /var/www/www.eclipse.org/htdocs'' | '''#''' ''ls -lA /var/www/www.eclipse.org/htdocs'' | ||
Line 90: | Line 90: | ||
lrwxrwxrwx 1 root root 25 2006-08-29 20:29 emf -> /home/nickb/workspace/emf | lrwxrwxrwx 1 root root 25 2006-08-29 20:29 emf -> /home/nickb/workspace/emf | ||
− | === download.eclipse.org === | + | ==== download.eclipse.org ==== |
'''#''' ''ls -lA /var/www/download.eclipse.org/htdocs'' | '''#''' ''ls -lA /var/www/download.eclipse.org/htdocs'' |
Revision as of 20:57, 29 August 2006
This page documents how to set up your local Linux system to spoof most of the Eclipse.org (www.eclipse.org and download.eclipse.org) infrastructure in order to test - in a sandbox - changes to your web and downloads content.
Thanks to Neil Skypuch for the initial setup work.
You will need to be root for most of the steps below.
Contents
/etc/hosts
To make your local machine think it's eclipse.org add this line to /etc/hosts
:
127.0.1.1 www.eclipse.org download.eclipse.org eclipse.org
Apache2 configuration
Add something like the following into your apache config file, /etc/apache2/sites-available/default
:
<VirtualHost *> ServerName www.eclipse.org ServerAlias eclipse.org DocumentRoot "/var/www/www.eclipse.org/htdocs" </VirtualHost>
<VirtualHost *> ServerName download.eclipse.org DocumentRoot "/var/www/download.eclipse.org/htdocs" </VirtualHost>
Create vhost directories
Create the directories from which you'll be serving the spoofed content:
mkdir -p /var/www/www.eclipse.org/htdocs; \ mkdir -p /var/www/download.eclipse.org/htdocs
Restart Apache2
apache2ctl restart - or - /etc/init.d/apache2 restart
Phoenix content
Extract eclipse.org-common from CVS and put it in the root of your webserver:
cd /var/www; \ cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/technology -Q ex -r HEAD -d eclipse.org-common org.eclipse.phoenix/eclipse.org-common
Now, symlink the Phoenix content from within your vhost htdocs folders:
cd /var/www/www.eclipse.org/htdocs/; ln -s /var/www/eclipse.org-common; \ cd /var/www/download.eclipse.org/htdocs/; ln -s /var/www/eclipse.org-common; \
Web content
You can checkout the content from CVS and put it into the htdocs folders, or you can check out the content in Eclipse and symlink your checked out projects from the htdocs folder.
Checkout directly
This is handy for maintaining a mirror server (eg., an internal build server which contains the same files as on download.eclipse.org). Changes you make to code - once committed back to CVS - can be updated running cvs update
in the htdocs folder. This can be run as a cronjob at some regular interval.
cd /var/www/www.eclipse.org/htdocs/; \ cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/org.eclipse -Q co -d emf www/emf
This is also useful for editing code on a machine which does not have an X server running or on which you don't have Eclipse installed. After making changes to code, simply check it back in to cvs.
cd /var/www/www.eclipse.org/htdocs/; \ cvs -d :ext:username@dev.eclipse.org:/cvsroot/org.eclipse -Q co -d emf www/emf vi emf/somefile.php cvs -d :ext:username@dev.eclipse.org:/cvsroot/org.eclipse -Q ci "emf/somefile.php" -m "[bug#] some commit comment"
Symlink workspace projects
This is handy for sandbox testing of code changes on your local workstation. Every change you make in Eclipse to your code will immediately be reflected on your local webserver.
cd /var/www/www.eclipse.org/htdocs/; ln -s ~/workspace/emf cd /var/www/download.eclipse.org/htdocs/; \ mkdir -p tools/emf; cd tools/emf; \ ln -s ~/workspace/emf-home/scripts; \ ln -s ~/workspace/emf-home/_projectCommon.php
Vhost directory listings
www.eclipse.org
# ls -lA /var/www/www.eclipse.org/htdocs lrwxrwxrwx 1 root root 28 2006-08-29 20:37 eclipse.org-common -> /var/www/eclipse.org-common/ lrwxrwxrwx 1 root root 25 2006-08-29 20:29 emf -> /home/nickb/workspace/emf
download.eclipse.org
# ls -lA /var/www/download.eclipse.org/htdocs lrwxrwxrwx 1 root root 27 2006-08-29 20:35 eclipse.org-common -> /var/www/eclipse.org-common drwxr-xr-x 3 root root 4096 2006-08-29 20:33 tools
# ls -lA /var/www/download.eclipse.org/htdocs/tools/emf lrwxrwxrwx 1 root root 49 2006-08-29 20:34 _projectCommon.php -> /home/nickb/workspace/emf-home/_projectCommon.php lrwxrwxrwx 1 root root 38 2006-08-29 20:33 scripts -> /home/nickb/workspace/emf-home/scripts
This text's title tends toward a tame tongue twister. ;-)