brin100 / drupal-single

Rackspace Heat template to deploy a single server with Drupal leveraging chef-solo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is a Heat template to deploy a single Linux server running Drupal.

Requirements

  • A Heat provider that supports the following:
    • OS::Nova::KeyPair
    • Rackspace::Cloud::Server
    • OS::Heat::RandomString
    • OS::Heat::ChefSolo
  • An OpenStack username, password, and tenant id.
  • python-heatclient >= v0.2.8:
pip install python-heatclient

We recommend installing the client within a Python virtual environment.

Parameters

Parameters can be replaced with your own values when standing up a stack. Use the -P flag to specify a custom parameter.

  • server_hostname: Hostname to use for the server that's built. (Default: Drupal)
  • username: Username for the Drupal admin login (Default: admin)
  • domain: Domain to be used with the Drupal site (Default: example.com)
  • image: Required: Server image used for all servers that are created as a part of this deployment. (Default: Ubuntu 12.04 LTS (Precise Pangolin))
  • version: Version of Drupal to install (Default: 7)
  • database_name: Drupal database name (Default: drupal)
  • flavor: Required: Rackspace Cloud Server flavor to use. The size is based on the amount of RAM for the provisioned server. (Default: 4 GB Performance)
  • chef_version: Version of chef client to use (Default: 11.14.2)
  • kitchen: URL for a git repo containing required cookbooks (Default: https://github.com/rackspace-orchestration-templates/drupal-single.git)

Notes on the version parameter

The version parameter is passed to drush, which downloads and installs drupal. Single integers will install the latest release of that major version. You may also specify specific sub-major releases such as 7.29 or 7.0-beta3. The Chef cookbook used by this deployment to finalize the install only supports major version 7, so although drush supports v6 and v8, you may only select v7 with this template.

Outputs

Once a stack comes online, use heat output-list to see all available outputs. Use heat output-show <OUTPUT NAME> to get the value of a specific output.

  • mysql_root_password: MySQL Root Password
  • private_key: SSH Private Key
  • drupal_password: Drupal Password
  • server_ip: Server IP
  • drupal_url: Drupal URL
  • drupal_user: Drupal User

For multi-line values, the response will come in an escaped form. To get rid of the escapes, use echo -e '<STRING>' > file.txt. For vim users, a substitution can be done within a file using %s/\\n/\r/g.

Stack Details

Getting Started

If you're new to Drupal, check out Getting started with Drupal 7 administration. The getting started document will help guide you through the initial steps of checking your site's status, customizing your site's informaion, adding users, and more!

Logging in via SSH

The private key provided in the passwords section can be used to login as root via SSH. We have an article on how to use these keys with Mac OS X and Linux as well as Windows using PuTTY.

Details of Your Setup

This deployment was stood up using chef-solo. Once the deployment is up, chef will not run again, so it is safe to modify configurations.

A system user called 'drupal' has been created as a part of this deployment. There is no password associated with this account. You will need to set a password for this user if you'd like to use the account for transferring content, backups, or other purposes. Since the account has no password, no one will be able to login as this user until a password is set.

Drupal was installed using Drush. Drupal is installed into /var/www/drupal and served by Apache. The Apache configuration is in /etc/apache2/sites-enabled/drupal.conf. Any changes to the configuration would require a restart of Apache.

MySQL is the database backend used in this deployment. The MySQL root password is included in the password section of this deployment. If you do lose the password, it is also available in /root/.my.cnf. MySQL backups are performed locally by Holland. The backups will be stored in /var/lib/mysqlbackup.

Updating Drupal

Drupal does provide community documentation on how to upgrade your installation of Drupal. There are several steps involved with the upgrade process. First, make sure to backup your site files and your database prior to taking any steps to replace the core site files. There are number of other tutorials available on places like YouTube that can also step you though the upgrade/update process. There is not currently a way to perform these upgrades automatically through the admin interface.

Migrating an Existing Site

Moving a Drupal site can be both difficult and time consuming. Drupal Modules such as the Backup and Migrate module can help you move your database content. We recommend backing everything up on both the source and destination locations before anything is done. The content you want to move over will be in the 'sites' directory. If you're running a single Drupal site, you may just need the content of 'sites/default/files' along with your database. Be careful not to overwrite the settings.php file within your site. It contains the database configuration for your site.

This deployment has all of the core drupal files in place, and their permissions are properly set. Be careful with ownerhip and permissions as you move things over. If you're unsure, check the original ownership and permissions of the files in this deployment.

Additional Modules

There are over 22,000 modules that have been created by an enaged developer community. The modules section on Drupal's website provides an easy way to search for and research modules.

Scaling out

This single server deployment is not well suited to be scaled out. We recommend leveraging a multi server option. If content needs to be moved, instructions above regarding migrating an existing site may help with that transition.

Contributing

There are substantial changes still happening within the OpenStack Heat project. Template contribution guidelines will be drafted in the near future.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Rackspace Heat template to deploy a single server with Drupal leveraging chef-solo

License:Apache License 2.0


Languages

Language:Ruby 53.3%Language:HTML 40.3%Language:Perl 6.2%Language:Python 0.1%Language:Shell 0.1%