Test server image is built using Packer tool.
Currently, only one type of builder is defined. amazon-ebs builder
is based on top of vanilla ubuntu 14.04 LTS (trusty) version in
us-west-1 region.
Dependent AWS resources are created and named as Koding-CI-Test.
Here's a brief structure of template:
-
Copy configuration files of following programs
- ssh
- s3cmd
-
Edit base system configurations
-
Execute
provision.shscript -
Execute
setup-koding.shscript
This script installs system wide koding development and runtime environment dependencies.
This script is meant to prepare working tree for koding development.
It is important to keep working tree clean. Clean up artifact files that won't be required during test runs.
You can make changes in following files:
- template.json
- provision.sh
- setup-koding.sh
Execute packer validate template.json command after you're done with
your changes and make sure there isn't any structural errors.
Execute packer build template.json command to initiate new server
image build process. packer will log standard output and error of
each command executed in provisioner scripts. You can proceed if
there isn't any errors interrupting provisioning.
Note that some errors don't interrupt image build process. You will get a half baked image as a result.
Edit
scripts/test-instance/instance-ami.coffee
file to set new AMI identifier as current. Also, add it to AMI list
to have test environment cleaner scripts terminate instances.
This editing part will be automated with a script soon.
Commit your changes and open a pull request to test your anew test server image.
Copy instance-ami.coffee file under scripts/test-instance
directory to same path in
koding/monitoring
repository. Open your pull request and have it merged as soon as
possible.
Copying contents of $HOME/.ssh overwrites ssh configuration
generated by packer -debug command. If you need to login into
Packer Builder server during image building process you need to use
respective private key after ssh configuration files are copied.