Skip to content

Latest commit

 

History

History
116 lines (106 loc) · 2.2 KB

README.md

File metadata and controls

116 lines (106 loc) · 2.2 KB

#Digital Ocean Ansible provisioning

##Instructions

###Install Ansible via Homebew (MacOS)

brew install ansible

###Install dopy

sudo easy_install pip
sudo pip install dopy

###Discover Digital Ocean internal ids (sizes, regions, images, ssh_keys)

$ export DO_CLIENT_ID=YOUR DIGITAL OCEAN CLIENT ID
$ export DO_API_KEY=YOUR DIGITAL OCEAN API KEY
$ chmod +x do.sh
$ ./do.sh

####Output (regions example)

{
    "regions": [
        {
            "id": 3,
            "name": "San Francisco 1",
            "slug": "sfo1"
        },
        {
            "id": 4,
            "name": "New York 2",
            "slug": "nyc2"
        },
        {
            "id": 5,
            "name": "Amsterdam 2",
            "slug": "ams2"
        },
        {
            "id": 6,
            "name": "Singapore 1",
            "slug": "sgp1"
        }
    ],
    "status": "OK"
}

Grab the ids that you need

###Update the correct DO values in playbook/vars/do.yml

do_client_id: yourclientid
do_api_key: yourapikey
do_ssh_key_ids: yourid1, yourid2 #Comma separated list
do_image_id: 3240850 #Centos 6.5 x64
do_size_id: 66 #512MB - 20GB 1CPU
do_region_id: 5 #ams2

###Variables values Change variables values according to your needs in .yml files inside the /vars folder

###Run Ansible playbook

$ ansible-playbook -i local playbook/provisioning.yml

##Miscellaneous info

  • A standard eZ Publish 5.x Vhost will be added during the HTTPD installation (The ServerName is specified inside the /playbook/vars/apache.yml config file)
  • Last Composer package will be installed by default
  • PHP packeges are splitted in 2 groups to avoid ansible/yum hanging

##Installed applications

  • libselinux-python
  • python-pip
  • boto
  • git
  • vim
  • wget
  • htop
  • zip
  • unzip
  • telnet
  • ntp
  • ImageMagick
  • ImageMagick-devel
  • ImageMagick-perl
  • httpd
  • php (5.5.x)
  • php-cli
  • php-common
  • php-devel
  • php-gd
  • php-mbstring
  • php-pdo
  • php-pecl-apc
  • php-xml
  • php-curl
  • php-imagick
  • php-intl
  • php-memcache
  • php-mcrypt
  • php-mhash
  • php-mysqlnd
  • php-xsl
  • composer
  • mysql-community-server (5.6.x)
  • mysql
  • MySQL-python
  • memcached (1.4.x)
  • node.js
  • npm