MediaWiki-Vagrant: Difference between revisions
add login info |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
||
| Line 49: | Line 49: | ||
==== Console Tools ==== | ==== Console Tools ==== | ||
It may be helpful to have the command line tools for Elastic Cloud installed so that you can test your connection ability. For Ubuntu, | It may be helpful to have the command line tools for Elastic Cloud installed so that you can test your connection ability. For Ubuntu, | ||
< | <syntaxhighlight lang="bash"> | ||
sudo apt-get install ec2-api-tools | sudo apt-get install ec2-api-tools | ||
ec2-describe-regions -v --auth-dry-run --aws-access-key KEY --aws-secret-key KEY | ec2-describe-regions -v --auth-dry-run --aws-access-key KEY --aws-secret-key KEY | ||
</ | </syntaxhighlight> | ||
Rather than specifying your keys on the command line, you may want to set them in <code>~/.bashrc</code> and <code>source</code> the file to bring them into your current shell session. <ref>For some reason, this didn't work for me the first time, so I regenerated keys, and it worked.</ref> | Rather than specifying your keys on the command line, you may want to set them in <code>~/.bashrc</code> and <code>source</code> the file to bring them into your current shell session. <ref>For some reason, this didn't work for me the first time, so I regenerated keys, and it worked.</ref> | ||
< | <syntaxhighlight lang="bash"> | ||
export AWS_ACCESS_KEY=THISISJUSTANEXAMPLE | export AWS_ACCESS_KEY=THISISJUSTANEXAMPLE | ||
export AWS_SECRET_KEY=ThisIsNotARealSecretEnterYourSecretHere | export AWS_SECRET_KEY=ThisIsNotARealSecretEnterYourSecretHere | ||
</ | </syntaxhighlight> | ||
==== Vagrant-AWS Plugin ==== | ==== Vagrant-AWS Plugin ==== | ||
You need the vagrant-aws plugin (https://github.com/mitchellh/vagrant-aws) | You need the vagrant-aws plugin (https://github.com/mitchellh/vagrant-aws) | ||
< | <syntaxhighlight lang="bash"> | ||
cd ~/vagrant | cd ~/vagrant | ||
vagrant plugin install vagrant-aws | vagrant plugin install vagrant-aws | ||
</ | </syntaxhighlight> | ||
== Status == | == Status == | ||
| Line 87: | Line 87: | ||
< | <syntaxhighlight lang="bash"> | ||
vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box | vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box | ||
vagrant box list | vagrant box list | ||
</ | </syntaxhighlight> | ||
You need to create a custom stanza in <code>Vagrantfile-extra.rb</code><ref>Don't edit Vagrantfile since that is distributed by MediaWiki-Vagrant and you won't be able to upgrade your environment</ref> | You need to create a custom stanza in <code>Vagrantfile-extra.rb</code><ref>Don't edit Vagrantfile since that is distributed by MediaWiki-Vagrant and you won't be able to upgrade your environment</ref> | ||
| Line 103: | Line 103: | ||
To get the keypair_name, you need to create (or upload) a keypair into your AWS Console for the region. It's easy to create a keypair in the AWS console, and as soon as you do, it will prompt you to download the .pem file. Save the .pem file to your ~/.ssh/ directory, and ensure the file mode is 400 | To get the keypair_name, you need to create (or upload) a keypair into your AWS Console for the region. It's easy to create a keypair in the AWS console, and as soon as you do, it will prompt you to download the .pem file. Save the .pem file to your ~/.ssh/ directory, and ensure the file mode is 400 | ||
< | <syntaxhighlight lang="bash"> | ||
chmod 400 ~/.ssh/my-aws-keys.pem | chmod 400 ~/.ssh/my-aws-keys.pem | ||
</ | </syntaxhighlight> | ||
Need to find the image (AMI) you want. You can search for Ubuntu images at http://cloud-images.ubuntu.com/locator/ec2/ The latest Ubuntu version used in MediaWiki-Vagrant as of March 2015 is Trusty-Tahr (or 14.04 LTS) You need to choose the region that you want to host in. So for example if you want to host in Oregon state, then you want the "US West" region for Amazon. Searching for "trusty 64 west" we can see several options for the AMD64 architecture | Need to find the image (AMI) you want. You can search for Ubuntu images at http://cloud-images.ubuntu.com/locator/ec2/ The latest Ubuntu version used in MediaWiki-Vagrant as of March 2015 is Trusty-Tahr (or 14.04 LTS) You need to choose the region that you want to host in. So for example if you want to host in Oregon state, then you want the "US West" region for Amazon. Searching for "trusty 64 west" we can see several options for the AMD64 architecture | ||
| Line 117: | Line 117: | ||
I tried to customize the Vagrantfile-extra.rb but couldn't quite understand the required structure | I tried to customize the Vagrantfile-extra.rb but couldn't quite understand the required structure | ||
< | <syntaxhighlight lang=ruby line> | ||
# -*- mode: ruby -*- | # -*- mode: ruby -*- | ||
# vi: set ft=ruby : | # vi: set ft=ruby : | ||
| Line 200: | Line 200: | ||
end | end | ||
</ | </syntaxhighlight> | ||
== Test or Run == | == Test or Run == | ||
When you're done with the customizations to the Vagrantfile-extra.rb | When you're done with the customizations to the Vagrantfile-extra.rb | ||
< | <syntaxhighlight lang="bash"> | ||
vagrant status | vagrant status | ||
## status looks good? | ## status looks good? | ||
vagrant up --provider=aws | vagrant up --provider=aws | ||
</ | </syntaxhighlight> | ||