If you are like me (the nasty investor/speculator type, who never bothered to get into mining :D), but you feel maybe
would be a good time to add that extra bit of hashing power to secure the Monero network (or at least make an attack slightly more expensive), then maybe this step-by-step guide to set up XMR mining via Amazon cloud computing might be interesting for you as well.
(Requires Amazon EC2 account, hooked up to a credit card. Registration is easy, btw.)
So here goes (assuming you have your ec2 account all set up):
1) Click on EC2, and then click on Spot Requests under Instances on left sidebar.
2) Click Request Spot Instances blue button near top, and then click Community AMIs and search for XMRminer. Select XMRminer2.
3) For Instance Type, select GPU instances g2.2xlarge, click next and set your maximum price (kind of expensive now, need to do like $0.09 per hour, used to be more like $0.06).
4) Click Review and Launch and then click Launch. At this point you need to setup your ssh keys. I did this a while ago, so I don't remember exact details, but it should be pretty straightforward. Let me know if you have issues.
5) Make yourself a cup of tea and wait 30-120 seconds while your instance is prepared.
6) You'll need to ssh into your instance. On Linux you just put your ssh keys in ~/.ssh and set permissions for 400 (I think), and if you ssh from that folder, that's all you need to do. I think on Windows, using Putty, you need to maybe convert the key to putty's format using an extra putty tool. Let me know if you need additional help with this.
7) Click on Instances in the left sidebar, and you should see a g2.2xlarge instance with green circle that says running. Click that and then click Connect at the top, and it should give you your IP address to connect to with some instructions.
8) On Linux your ssh command should look like:
Use ubuntu as user not root.
9) Maybe it's more like 180-300 seconds. Drink some tea while waiting.
10) When it prompts you to permanently add key, click "yes".
11) Now, you need to edit cpustart.sh and gpustart.sh in your home directory using either vi or nano, unless you want to mine to my XMR address ;) It looks like if you want to mine directly to exchange, just replace my XMR address in both files with YourExchangeXMRAddress.YourExchangePaymentID.
12) You need to run two commands, one to make gpuminer work, and other to make cpuminer much faster:
sudo ldconfig /usr/local/cuda-5.5/lib64
sudo sysctl -w vm.nr_hugepages=24
13) I just made another script called start.sh to launch both miners at once, and it seems to work. So do:
then vi or nano start.sh and add:
#!/bin/bash
screen /home/ubuntu/cpustart.sh
screen /home/ubuntu/gpustart.sh
then:
and then launch with:
You need the screen so that when you disconnect your ssh session, the miners keep mining.
That's it. You can disconnect and both miners should be hashing away. You can ssh back in and run
and you should see minerd and ccminer listed in the processes somewhere near the bottom.
If you want to launch a shitload of instances, then obviously you want to automate this process and not do it manually every time. In this case, you need to make sure you edit the files so that they have your XMR address and not mine, and create the start.sh script in home directory, then edit the rc.local file by doing:
and add the following lines:
ldconfig /usr/local/cuda-5.5/lib64
sysctl -w vm.nr_hugepages=24
screen /home/ubuntu/start.sh
This way, as soon as the instance boots up, it should autolaunch the miners. I haven't tried this final automation part (as I don't normally launch a shitload of instances), but I think this should work, and I'm gonna verify it now.
Now, go back to your EC2 console, right-click on the g2.2xlarge instance in your Instances window, and select Create Image. This will sever your connection and cause a reboot, but you will now have your own image/AMI that you can launch 10s or 100s or 1000s of, just by entering however many instances you want when filling out your spot request form.
I just tried the rc.local thing, and it seems to auto-launch ccminer and minerd :)
Hope the above is useful, at least for some of you. I know it was for me :)