Add --size for ec2 creation

This commit is contained in:
Johannes Zellner 2016-06-28 11:33:28 +02:00
parent 82244edf49
commit 35213f5fde

View File

@ -22,6 +22,7 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const BOX_VERSION = process.env.BOX_VERSION;
const CUSTOM_DOMAIN = process.env.CUSTOM_DOMAIN;
const EC2_TYPE = 't2.micro';
const EC2_SIZE = 40;
const EC2_REGION = 'eu-central-1';
const EC2_SSH_KEY = 'id_rsa_yellowtent';
const EC2_SUBNET = 'subnet-801402e9';
@ -60,7 +61,22 @@ describe('Selfhost EC2 Cloudron creation', function () {
var cloudron, appId, backupInfo, instanceId, newInstanceId;
it('can create a cloudron', function () {
var out = machine(util.format('create ec2 --fqdn %s --type %s --region %s --ssh-key %s --access-key-id %s --secret-access-key %s --subnet %s --security-group %s --backup-key %s --backup-bucket %s --release %s', CUSTOM_DOMAIN, EC2_TYPE, EC2_REGION, EC2_SSH_KEY, AWS_ACCESS_KEY, AWS_ACCESS_SECRET, EC2_SUBNET, EC2_SECURITY_GROUP, BACKUP_KEY, BACKUP_BUCKET, BOX_VERSION));
var params = [
'--fqdn ' + CUSTOM_DOMAIN,
'--type ' + EC2_TYPE,
'--size ' + EC2_SIZE,
'--region ' + EC2_REGION,
'--ssh-key ' + EC2_SSH_KEY,
'--access-key-id ' + AWS_ACCESS_KEY,
'--secret-access-key ' + AWS_ACCESS_SECRET,
'--subnet ' + EC2_SUBNET,
'--security-group ' + EC2_SECURITY_GROUP,
'--backup-key ' + BACKUP_KEY,
'--backup-bucket ' + BACKUP_BUCKET,
'--release ' + BOX_VERSION
];
var out = machine('create ec2 ' + params.join(' '));
if (out.stdout.indexOf('You can now use your Cloudron at') === -1) {
console.error(out.stdout, out.stderr);