1

I'm planning to set up a sort of private hosting environment for me and my webprojects and am wondering if there is a great/easy solution to spin up new ec2 volumes (always a dedicated volume/machine) for each of my webprojects fast.

I'm right now using one EC2 with Plesk (Ubuntu) installed, that I really love. I simply create a Domain and the project is basically setup with users, ftp-access, etc.

I wonder if there is a way to have sort of the "same " setup but for each domain it basically creates a dedicated hosting project.

Any clever ideas on how to create such a thing?

Thanks, Matt

Matt
  • 43
  • 1
  • 1
  • 11

1 Answers1

1

I don't know Plesk but you can certainly automate instance creation. Usually you'll use CloudFormation or Terraform to do that - they will create the EC2 Instance, IAM Roles, Security Groups, etc, the same config every time.

For the actual instance you've got a couple of options:

  1. Create a Gold Image with your desired basic configuration that you want to use as a baseline for your projects. You can then use this image to spin up new instances and they will all come up the same.

  2. You can use something like Packer to automatically create the Gold Images for you whenever your requirements change.

  3. Have some start up automation that will take e.g. a domain name and use Plesk or something similar to automatically configure your environment.

Ideally you should have all the config and customer files in a separate storage (e.g. AWS EFS) instead of on the EC2 / EBS volumes and treat all your instances as immutable, disposable compute power. That will enable you to use autoscaling, docker containers and other advanced forms of automation. But that may be something to aim for later.

Hope that helps :)

MLu
  • 23,798
  • 5
  • 54
  • 81