https://github.com/chapter-three/creo-server
A barebones Drupal 6/7 development server management script using Apache, MySQL, PHP, Solr, Drush, and Gitolite.
https://github.com/chapter-three/creo-server
Last synced: about 2 months ago
JSON representation
A barebones Drupal 6/7 development server management script using Apache, MySQL, PHP, Solr, Drush, and Gitolite.
- Host: GitHub
- URL: https://github.com/chapter-three/creo-server
- Owner: chapter-three
- Created: 2012-02-03T03:40:48.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-02-05T01:35:29.000Z (about 12 years ago)
- Last Synced: 2025-01-18T06:27:39.376Z (3 months ago)
- Language: Shell
- Homepage:
- Size: 248 KB
- Stars: 3
- Watchers: 45
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkd
Awesome Lists containing this project
README
Creo Project - Server
=====================A barebones Drupal 6/7 development server management script using Apache, MySQL, PHP, Solr, Drush, and Gitolite.
Description
-----------
This script simplifies the process of adding a project to your development server. For a new or imported project:
It creates a Gitolite-controlled repo, imports the code, adds an Apache configuration, creates a MySQL database, and creates
a Solr instance. Given a site archive, you can generally have a site imported and running within a minute.For non-admin users: The script automates the process of creating a server-side project sandbox. Multiple devs can work
on their own clone of the code while sharing (or not sharing) the database or site files. Pushing to the primary repo
updates the main dev site automatically. Developers are free to simply clone the repo and work on their local machines also.Example Usage
-------------
Create a project from an existing project:`sudo creo create PROJECT -t OLD_PROJECT`
Import an existing project repo (make the code into a repo, and don't add Drupal files directory):
`sudo creo import PROJECT -i /root/PROJECT-REPO`
`sudo tar zxf PROJECT-FILES.tar.gz -C /var/www/projects/PROJECT/sites/default/`
`sudo chown git:git -R /var/www/projects/PROJECT/sites/default/`
`mysql PROJECT < PROJECT.sql`
Make a code sandbox (using primary database, and a symbolic link to files) at /home/user/public_html
available at http://project.user.dev.example.com:`creo sandbox PROJECT`
Required Software
-----------------
1. Apache 2.x (Tested with 2.2.16)
2. MySQL 5.x (Tested with 5.1.49-3)
3. PHP 5.x (Tested with 5.3.3-7)
4. Drush 4.x (Tested with 4.5)
5. Tomcat 6.x (Tested with 6.0.35-1)
6. Solr 1.4.x or 3.5.x (Tested with 1.4.1)
8. Gitolite 2.x (Tested with 2/8/12 clone)Notes
-----
Creo is an updated and re-organized version of the original C3 dev project management script. The script works well
for many use cases, but a lot of work is needed. Ideally it would be rewritten in PHP/Ruby/Python and use
Chef/Ansible/etc for the initial configuration. But you know... time.There are many security considerations with using this. This is NOT for client production hosting, this is
for development only. Only employees and contractors should have SSH access to a server running this script.
Few users should have sudo for adding/importing projects, most users will simply make "sandboxes."Requires significant server configuration. Review INSTALL.mkd for setup from a bare Ubuntu install.
This script was designed/tested on Debian 6 Squeeze and Ubuntu 10.04/12.04. It may be updated in the future to
work with RHEL and CentOS.This works well with Pantheon, but currently requires an additional symbolic link to work with Acquia due to
the docroot in the repo.Installation
------------
0. Follow server setup details in INSTALL.mkd
1. Download or clone the creo-server project into /usr/local/creo-server
* `git clone [email protected]:chapter-three/creo-server.git /usr/local/`
2. Create a symbolic link from /usr/bin/creo to /usr/local/creo-server.
* `ln -s /usr/local/creo-server/creo /usr/bin/creo`
3. Copy creo.conf.sample to creo.conf and adjust the values to match your server
4. Install Apache, MySQL, PHP and Tomcat6 using the package manager, apt-get or aptitude.
5. Download and install Drush in a globally accessible location. (Installation via Pear is best)
6. Download and setup Solr for multi-instance (not multi-core.) Debian/Ubuntu instructions:
* Goto http://www.apache.org/dyn/closer.cgi and find an Apache Solr mirror.
* `wget http://$MIRROR/apache/lucene/solr/3.6.1/apache-solr-3.6.1.tgz` (commands may differ for different versions)
* `tar zxf apache-solr-3.6.1.tgz`
* `/etc/init.d/tomcat6 stop`
* `cp apache-solr-3.6.1/dist/apache-solr-3.6.1.war /var/lib/tomcat6/webapps/solr.war`
* `/etc/init.d/tomcat6 start` (This creates the /var/lib/tomcat6/webapps/solr directory)
* `/etc/init.d/tomcat6 stop`
* `cp -aR /var/lib/tomcat6/webapps/solr /var/lib/tomcat6/webapps/TEMPLATE`
* `mkdir -p /var/solr/TEMPLATE`
* `cp -aR apache-solr-3.6.1/example/solr/* /var/solr/TEMPLATE`
* `pico /etc/tomcat6/Catalina/localhost/TEMPLATE.xml` (use vim/vi if you want!)
* Paste in the following and save (Save CTRL-X then enter):\
\
\* Change the Tomcat server port from the default 8080 to 8983(or any other port of your choice)
`pico /etc/tomcat6/server.xml` and change:\
To:
\
* Download the Apachesolr (or Search API Solr search) from Drupal.org:
`wget http://ftp.drupal.org/files/projects/apachesolr-7.x-1.x-dev.tar.gz`
* `tar zxf apachesolr-7.x-1.x-dev.tar.gz`
* Replace the Solr XML config files:
`cp apachesolr/solr-conf/protwords.txt /var/solr/TEMPLATE/conf/protwords.txt`
`cp apachesolr/solr-conf/schema-solr3x.xml /var/solr/TEMPLATE/conf/schema.xml`
`cp apachesolr/solr-conf/solrconfig-solr3x.xml /var/solr/TEMPLATE/conf/solrconfig.xml`
* `/etc/init.d/tomcat6 start`
7. Create Apache, and Solr template files
* Todo
8. Go!Todo
----
* Use 'dialog' to create interactive mode
* Rollback changes on error
* Metadata storage in MySQL or flat file.
* Additional security for databases, and PHP.