plesk/plesk-deploy-ansible

Name: plesk-deploy-ansible

Owner: Plesk

Description: null

Created: 2017-06-15 10:15:26.0

Updated: 2018-04-24 07:41:41.0

Pushed: 2017-06-15 10:30:35.0

Homepage: null

Size: 24

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

This is a set of ansible playbooks for various Plesk deployment

Overview

The playbooks allow to deploy Plesk in cases:

You need ansible v2+ You can run ansible in two ways.

The first one directly via CLI. In such case you need to have ansible installed on your machine:

Sample: ansible-playbook -i hosts plesk-amazon-ec2-from-ami.yml

The second way is to use Ansible shipped via Docker container. This way is preferred if you already use Docker and don't want to install one more piece of software to your machine because ansible is usually installed via pip, it also can require some additional libs, etc etc etc.

Note: see open issue, described in FAQ below.

To use this approach, you can just have Docker installed, and you need to run as follows: ./ansible-playbook-viadocker -i hosts plesk-amazon-ec2-from-ami.yml

That's it.

Inventory files

Few words about inventory. It has two parts:

Note: Credentials inventory file is not included in a git repo and is added to .gitignore file

Get Started

To start work with the Plesk deployment playbooks you should:

  1. Define Amazon AWS and Digitalocesn credentials starting with: cp -f group_vars/credentials.yml.sample group_vars/credentials.yml
  2. Install ansible v2+
  3. Check group_vars/all.yml for settings specific for your account, especially Amazon AWS.

FAQ

Amazon EC2 asks for authorization while provisioning of VM

When you attempt to create VM from AMI published in Marketplace, you can see a message similar to the sample below. All you need to do - just copy the provided link and navigate it in your browser with an active session to your Amazon AWS account. This is required to authorize the script for deployment on behalf of your AWS account from CLI.

TASK [amazon-ec2 : Create EC2 Instance]


fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Instance creation failed => OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit http://aws.amazon.com/marketplace/pp?sku=dw81irkz67efb1tr712312313uet”}

Execution ansible-playbook via Docker


There is a known with required libs in the packages docker image. The following image is used https://hub.docker.com/r/williamyeh/ansible/ since ansible doesn't support/develop their own. So, since the latest roles update, execution via docker doesn't work for now :(


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.