This documents how to install RocketGit in Amazon Cloud.
== Create an AMI ==
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingVirtualMachinesinAmazonEC2.html
- Download rocketgit1.qcow2.xz image:
wget --continue http://downloads.rocketgit.com/vm/last/rocketgit1.qcow2.xz
xz -d rocketgit1.qcow2.xz
qemu-img convert -p rocketgit1.qcow2 -O raw rocketgit1.raw
TODO: how it will be transformed into an AMI?
TODO: aws ec2 import-image \
TODO: maybe use ec2-import-instance?
TODO: maybe use ec2-import-volume?
ec2-import-instance rocketgit1.raw \
-f raw \
-t t2.micro \
-b my_aws_bucket \
-o ??? \
-w ??? \
-p Linux
Use ec2-resume-import to resume the import
Use ec2-describe-conversion-tasks to see the progress.
== Security group ==
aws ec2 create-security-group \
--group-name MyRocketGitSecurityGroup \
--description 'This must be used for RocketGit instances'
for post in 22 80 443 9418; do
aws ec2 authorize-security-group-ingress \
--group-name MyRocketGitSecurityGroup \
--protocol tcp \
--port ${port} \
--cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress \
--group-name MyRocketGitSecurityGroup \
--protocol tcp \
--port ${port} \
--cidr ::/0
done
== Create a key pair ==
To be able to login, you have to create a key pair.
aws ec2 create-key-pair --key-name MyKeyForRocketGit
TODO: save the key to a file (in .ssh dir)
== Run an instance ==
More information here; http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html
aws ec2 run-instances \
--image-id <put_here_the_AMI_id_created_above> \
--security-groups MyRocketGitSecurityGroup \
--key-name MyKeyForRocketGit \
--instance-type t2.micro \
--region <put_here_the_region_for_example_TODO> \
--no-ebs-optimized
Add:
--associate-public-ip-address - TODO
--ebs-optimized - TODO
TODO: ec2-describe-instances - to find out the ip?
== Allocate an Elastic IP ==
== Finish ==
Follow http://r1i:9000/op/download/vm#common to finish installation.
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master