I created a scalr 3.0 to 3.5 db migration script for my own purposes based
on the diff between the two scalr.sql files. Its seems to have worked. I
thought I would share. Use at your own risk!! :) Post any corrections
here.
-Val
--
You received this message because you are subscribed to the Google Groups
"scalr-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/scalr-discuss/-/8D5eSBoC5e4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/scalr-discuss?hl=en.
CREATE TABLE IF NOT EXISTS `ui_errors` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tm` datetime NOT NULL,
`file` varchar(255) NOT NULL,
`lineno` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
`short` varchar(255) NOT NULL,
`message` text NOT NULL,
`browser` varchar(255) NOT NULL,
`cnt` int(11) NOT NULL DEFAULT '1',
`account_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `file` (`file`,`lineno`,`short`)
) ENGINE=MyISAM ;
CREATE TABLE IF NOT EXISTS `role_scripts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) DEFAULT NULL,
`event_name` varchar(50) DEFAULT NULL,
`target` varchar(15) DEFAULT NULL,
`script_id` int(11) DEFAULT NULL,
`version` varchar(10) DEFAULT NULL,
`timeout` int(5) DEFAULT NULL,
`issync` tinyint(1) DEFAULT NULL,
`params` text,
`order_index` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `role_id` (`role_id`),
KEY `script_id` (`script_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
ALTER TABLE `role_scripts`
ADD CONSTRAINT `role_scripts_ibfk_2` FOREIGN KEY (`script_id`) REFERENCES `scripts` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
ADD CONSTRAINT `role_scripts_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION;
ALTER TABLE `farms` ADD FOREIGN KEY ( `clientid` ) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION ;
ALTER TABLE `server_operations` ADD `timestamp` INT( 11 ) NULL AFTER `id`;
ALTER TABLE `server_operations` ADD `status` VARCHAR( 20 ) NULL AFTER `timestamp`;
ALTER TABLE `server_operations` DROP INDEX `server_id` , ADD INDEX `server_id` ( `server_id` , `name` ( 20 ) );
ALTER TABLE `account_users` ADD `loginattempts` INT(4) NOT NULL DEFAULT '0';
ALTER TABLE `client_environments` ADD `status` VARCHAR( 16 ) NOT NULL DEFAULT 'Active';
ALTER TABLE `role_images` ADD `architecture ` VARCHAR( 25 ) DEFAULT NULL;
ALTER TABLE `role_images` ADD `architecture` VARCHAR( 25 ) DEFAULT NULL;
ALTER TABLE `role_images` ADD `os_family` VARCHAR( 25 ) DEFAULT NULL;
ALTER TABLE `role_images` ADD `os_name` VARCHAR( 25 ) DEFAULT NULL;
ALTER TABLE `role_images` ADD `os_version` VARCHAR( 25 ) DEFAULT NULL;
ALTER TABLE `role_images` ADD `agent_version` VARCHAR( 25 ) DEFAULT NULL;
INSERT INTO `roles` VALUES
oneiric', '0.7.178'),
(38240, 'base-ubuntu1204', 'SHARED', 0, 0, 'Base role', 'base', 'i386', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38241, 'base64-ubuntu1204', 'SHARED', 0, 0, 'Base role', 'base', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38242, 'redis-ubuntu1204', 'SHARED', 0, 0, 'Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.', 'redis', 'i386', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38243, 'redis64-ubuntu1204', 'SHARED', 0, 0, 'Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.', 'redis', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38244, 'postgresql-ubuntu1204', 'SHARED', 0, 0, 'PostgreSQL database server. Scalr automatically assigns master and slave roles, if multiple instances launched, and re-assigns during scaling or curing.', 'postgresql', 'i386', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38245, 'postgresql64-ubuntu1204', 'SHARED', 0, 0, 'PostgreSQL database server. Scalr automatically assigns master and slave roles, if multiple instances launched, and re-assigns during scaling or curing.', 'postgresql', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38246, 'mongodb64-ubuntu1204', 'SHARED', 0, 0, 'MongoDB (from "humongous") is a scalable, high-performance, open source NoSQL database. ', 'mongodb', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.221'),
(38353, 'lb-nginx-ubuntu1204', 'SHARED', 0, 0, 'Frontend web server/load balancer, running nginx. Proxies all requests to all instances of Application Server role.', 'www', 'i386', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.222'),
(38354, 'lb-nginx64-ubuntu1204', 'SHARED', 0, 0, 'Frontend web server/load balancer, running nginx. Proxies all requests to all instances of Application Server role.', 'www', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.222'),
(38355, 'app-apache-ubuntu1204', 'SHARED', 0, 0, 'Can act as a backend (if farm contains load balancer role) or frontend web server.', 'app', 'i386', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.222'),
(38356, 'app-apache64-ubuntu1204', 'SHARED', 0, 0, 'Can act as a backend (if farm contains load balancer role) or frontend web server.', 'app', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 precise', '0.7.222'),
(39551, 'mysql-ubuntu1204', 'SHARED', 0, 0, 'MySQL database server. Scalr automatically assigns master and slave roles, if multiple instances launched, and re-assigns during scaling or curing.', 'mysql2', 'i386', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 oneiric', '0.7.232'),
(39552, 'mysql64-ubuntu1204', 'SHARED', 0, 0, 'MySQL database server. Scalr automatically assigns master and slave roles, if multiple instances launched, and re-assigns during scaling or curing.', 'mysql2', 'x86_64', 1, NULL, 'Approved', 2, 'Ubuntu 12.04 oneiric', '0.7.232');
delete from `roles` where id in (16374,16375);
delete from `role_behaviors`
where id in (29892,29891);
delete from `role_behaviors`
where id in (29890,29803);
delete from `role_behaviors`
where role_id <= 27507
and id not in (28991,28992,29062,29053,29052,11671,30184,30171,15780,15787,15965,15967);
INSERT INTO `role_behaviors` (`id`, `role_id`, `behavior`) VALUES
(41658, 16161, 'mysql'),
(41659, 16162, 'mysql'),
(36579, 16163, 'base'),
(41444, 16164, 'base'),
(41475, 18015, 'app'),
(41535, 18016, 'app'),
(41476, 18017, 'www'),
(41527, 18018, 'www'),
(41667, 18367, 'app'),
(41666, 18367, 'mysql'),
(41549, 18368, 'app'),
(41548, 18368, 'mysql'),
(41280, 18615, 'base'),
(41272, 18617, 'app'),
(41306, 18618, 'app'),
(41277, 18619, 'www'),
(41303, 18620, 'www'),
(41300, 18621, 'mysql'),
(41321, 18622, 'mysql'),
(41351, 18624, 'app'),
(41350, 18624, 'mysql'),
(41312, 24151, 'mysql'),
(41287, 24154, 'mysql'),
(41309, 25952, 'memcached'),
(41281, 25955, 'memcached'),
(36725, 25957, 'memcached'),
(36693, 25958, 'memcached'),
(41286, 26539, 'postgresql'),
(41315, 26542, 'postgresql'),
(41925, 26543, 'postgresql'),
(41930, 26544, 'postgresql'),
(41316, 27481, 'redis'),
(41926, 27482, 'redis'),
(41296, 27506, 'redis'),
(41478, 27507, 'redis'),
(41317, 31011, 'rabbitmq'),
(41297, 31024, 'rabbitmq'),
(41318, 33205, 'mongodb'),
(41543, 33206, 'mongodb'),
(39511, 38240, 'base'),
(39513, 38241, 'base'),
(39552, 38242, 'mysql2'),
(39514, 38243, 'redis'),
(39512, 38244, 'postgresql'),
(39516, 38245, 'postgresql'),
(39523, 38246, 'mongodb'),
(39713, 38353, 'www'),
(39672, 38354, 'www'),
(39710, 38355, 'app'),
(39669, 38356, 'app'),
(41980, 39551, 'mysql2'),
(42042, 39552, 'mysql2');
INSERT INTO `role_images` (`id`, `role_id`, `cloud_location`, `image_id`, `platform`, `architecture`, `os_family`, `os_name`, `os_version`, `agent_version`) VALUES
(25782, 16164, 'us-west-2', 'ami-eefe72de', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25794, 18018, 'us-west-2', 'ami-3aff730a', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25801, 18016, 'us-west-2', 'ami-3cff730c', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25808, 18368, 'us-west-2', 'ami-22ff7312', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25815, 25957, 'us-west-2', 'ami-2cff731c', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25823, 26544, 'us-west-2', 'ami-12ff7322', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25831, 27482, 'us-west-2', 'ami-14ff7324', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25840, 16164, 'sa-east-1', 'ami-10a6780d', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25850, 18016, 'sa-east-1', 'ami-12a6780f', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25857, 18018, 'sa-east-1', 'ami-04a67819', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25867, 18368, 'sa-east-1', 'ami-00a6781d', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25875, 25957, 'sa-east-1', 'ami-02a6781f', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25884, 26544, 'sa-east-1', 'ami-3aa67827', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25891, 27482, 'sa-east-1', 'ami-30a6782d', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25897, 33206, 'sa-east-1', 'ami-36a6782b', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25973, 18017, 'sa-east-1', 'ami-e2a678ff', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25980, 18015, 'sa-east-1', 'ami-1ca77901', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25987, 16163, 'sa-east-1', 'ami-1ea77903', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(25994, 18367, 'sa-east-1', 'ami-18a77905', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26001, 25958, 'sa-east-1', 'ami-1aa77907', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26007, 26543, 'sa-east-1', 'ami-16a7790b', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26014, 27507, 'sa-east-1', 'ami-0ca77911', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26022, 33206, 'us-west-2', 'ami-36f97506', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26032, 16163, 'us-west-2', 'ami-26f97516', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26039, 18017, 'us-west-2', 'ami-10f97520', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26049, 18015, 'us-west-2', 'ami-12f97522', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26056, 18367, 'us-west-2', 'ami-18f97528', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26065, 25958, 'us-west-2', 'ami-16f97526', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26072, 27507, 'us-west-2', 'ami-1cf9752c', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(26080, 26543, 'us-west-2', 'ami-1ef9752e', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.206'),
(27854, 38240, 'us-east-1', 'ami-803194e9', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27856, 38241, 'us-east-1', 'ami-5630953f', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27859, 38243, 'us-east-1', 'ami-2a309543', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27860, 38245, 'us-east-1', 'ami-0c309565', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27862, 38242, 'us-east-1', 'ami-f430959d', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27865, 38246, 'us-east-1', 'ami-c83095a1', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27866, 38244, 'us-east-1', 'ami-c63095af', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27885, 38240, 'us-west-1', 'ami-65df8420', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27898, 38244, 'us-west-1', 'ami-61df8424', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27902, 38242, 'us-west-1', 'ami-67df8422', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27926, 38241, 'us-west-1', 'ami-6bdf842e', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27928, 38243, 'us-west-1', 'ami-77df8432', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27931, 38245, 'us-west-1', 'ami-75df8430', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27936, 38240, 'us-west-2', 'ami-aea72b9e', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27941, 38246, 'us-west-1', 'ami-07df8442', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27945, 38242, 'us-west-2', 'ami-92a72ba2', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27948, 38244, 'us-west-2', 'ami-9ca72bac', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27954, 38241, 'us-west-2', 'ami-9ea72bae', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27957, 38243, 'us-west-2', 'ami-84a72bb4', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27970, 38245, 'us-west-2', 'ami-86a72bb6', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27975, 38246, 'us-west-2', 'ami-88a72bb8', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27979, 38240, 'eu-west-1', 'ami-cb6d57bf', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27987, 38242, 'eu-west-1', 'ami-ab6d57df', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27993, 38243, 'eu-west-1', 'ami-9f6d57eb', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(27998, 38241, 'eu-west-1', 'ami-856d57f1', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28002, 38244, 'eu-west-1', 'ami-7f62580b', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28006, 38246, 'eu-west-1', 'ami-65625811', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28010, 38245, 'eu-west-1', 'ami-7b62580f', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28015, 38244, 'ap-southeast-1', 'ami-06094f54', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28020, 38243, 'ap-southeast-1', 'ami-34094f66', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28025, 38242, 'ap-southeast-1', 'ami-3a094f68', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28030, 38241, 'ap-southeast-1', 'ami-26094f74', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28035, 38246, 'ap-southeast-1', 'ami-28094f7a', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28040, 38245, 'ap-southeast-1', 'ami-2a094f78', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28045, 38240, 'ap-southeast-1', 'ami-d2094f80', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28051, 38244, 'ap-northeast-1', 'ami-5070c051', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28057, 38240, 'ap-northeast-1', 'ami-5270c053', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28063, 38245, 'ap-northeast-1', 'ami-5c70c05d', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28069, 38241, 'ap-northeast-1', 'ami-6a70c06b', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28075, 38243, 'ap-northeast-1', 'ami-6870c069', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28081, 38246, 'ap-northeast-1', 'ami-a870c0a9', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28088, 38240, 'sa-east-1', 'ami-52c51b4f', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28095, 38244, 'sa-east-1', 'ami-50c51b4d', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28102, 38241, 'sa-east-1', 'ami-46c51b5b', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28109, 38243, 'sa-east-1', 'ami-42c51b5f', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28115, 38242, 'sa-east-1', 'ami-7cc51b61', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28122, 38245, 'sa-east-1', 'ami-7ac51b67', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28132, 38246, 'sa-east-1', 'ami-92c51b8f', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28156, 38242, 'ap-northeast-1', 'ami-da71c1db', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28180, 38355, 'sa-east-1', 'ami-8ac21c97', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28181, 38356, 'us-east-1', 'ami-ce1bbea7', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28182, 38354, 'us-east-1', 'ami-f01bbe99', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28185, 38353, 'sa-east-1', 'ami-82c21c9f', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28192, 38353, 'us-east-1', 'ami-101abf79', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28194, 38356, 'sa-east-1', 'ami-b8c21ca5', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28196, 38355, 'us-east-1', 'ami-ec1abf85', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28200, 38354, 'sa-east-1', 'ami-bac21ca7', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28214, 38354, 'eu-west-1', 'ami-475b6133', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28218, 38356, 'eu-west-1', 'ami-415b6135', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28223, 38356, 'ap-southeast-1', 'ami-56125404', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28229, 38354, 'ap-southeast-1', 'ami-42125410', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28234, 38354, 'ap-northeast-1', 'ami-2a76c62b', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28242, 38356, 'ap-northeast-1', 'ami-2c76c62d', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28248, 38356, 'us-west-1', 'ami-a5d18ae0', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28254, 38354, 'us-west-1', 'ami-9bd18ade', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28262, 38356, 'us-west-2', 'ami-40a22e70', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28270, 38354, 'us-west-2', 'ami-b0a22e80', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28278, 38355, 'ap-northeast-1', 'ami-7876c679', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28283, 38355, 'ap-southeast-1', 'ami-3e12546c', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28290, 38353, 'ap-northeast-1', 'ami-7e76c67f', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28294, 38353, 'ap-southeast-1', 'ami-d0125482', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28299, 38355, 'eu-west-1', 'ami-55586221', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28304, 38353, 'eu-west-1', 'ami-6b58621f', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28315, 38353, 'us-west-1', 'ami-e3d08ba6', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28321, 38355, 'us-west-1', 'ami-edd08ba8', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28329, 38355, 'us-west-2', 'ami-daa22eea', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(28337, 38353, 'us-west-2', 'ami-c0a22ef0', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.222'),
(29597, 16162, 'sa-east-1', 'ami-de1ec0c3', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.228'),
(29687, 16161, 'sa-east-1', 'ami-3e1cc223', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.228'),
(29776, 16161, 'us-west-2', 'ami-8c75f9bc', 'ec2', 'i386', 'centos', 'Centos 5.8 Final', '5', '0.7.228'),
(29783, 16162, 'us-west-2', 'ami-f475f9c4', 'ec2', 'x86_64', 'centos', 'Centos 5.8 Final', '5', '0.7.228'),
(29977, 39551, 'sa-east-1', 'ami-2e15cb33', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(29981, 39552, 'us-east-1', 'ami-10872779', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(29983, 39551, 'us-east-1', 'ami-1e872777', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(29987, 39552, 'sa-east-1', 'ami-2015cb3d', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(29990, 39552, 'ap-northeast-1', 'ami-00a91a01', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(29995, 39551, 'ap-northeast-1', 'ami-feaa19ff', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(29999, 39551, 'ap-southeast-1', 'ami-2cb3f57e', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30005, 39552, 'eu-west-1', 'ami-3f181d4b', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30010, 39551, 'eu-west-1', 'ami-e5181d91', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30019, 39552, 'us-west-1', 'ami-cfb0ea8a', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30025, 39551, 'us-west-1', 'ami-e9b0eaac', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30031, 39552, 'us-west-2', 'ami-6c0a865c', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30039, 39551, 'us-west-2', 'ami-540a8664', 'ec2', 'i386', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233'),
(30075, 39552, 'ap-southeast-1', 'ami-5cbff90e', 'ec2', 'x86_64', 'ubuntu', 'Ubuntu 12.04 Precise', '12.04', '0.7.233');
delete from `role_parameters`
where id between 8557 and 8560;
INSERT INTO `role_parameters` (`id`, `role_id`, `name`, `type`, `isrequired`, `defval`, `allow_multiple_choice`, `options`, `hash`, `issystem`) VALUES
(9189, 38353, 'Nginx HTTPS Vhost Template', 'textarea', 1, '{literal}server { {/literal}\r\n listen 443;\r\n server_name {$host} www.{$host} {$server_alias};\r\n \r\n ssl on;\r\n ssl_certificate /etc/aws/keys/ssl/https.crt;\r\n ssl_certificate_key /etc/aws/keys/ssl/https.key;\r\n\r\n ssl_session_timeout 10m;\r\n ssl_session_cache shared:SSL:10m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n{literal}\r\n location / {\r\n proxy_pass http://backend;\r\n proxy_set_header Host $host;\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n client_max_body_size 10m;\r\n client_body_buffer_size 128k;\r\n \r\n proxy_buffering on;\r\n proxy_connect_timeout 15;\r\n proxy_intercept_errors on; \r\n }\r\n} {/literal}', 0, '', 'nginx_https_vhost_template', 1),
(9190, 38354, 'Nginx HTTPS Vhost Template', 'textarea', 1, '{literal}server { {/literal}\r\n listen 443;\r\n server_name {$host} www.{$host} {$server_alias};\r\n \r\n ssl on;\r\n ssl_certificate /etc/aws/keys/ssl/https.crt;\r\n ssl_certificate_key /etc/aws/keys/ssl/https.key;\r\n\r\n ssl_session_timeout 10m;\r\n ssl_session_cache shared:SSL:10m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n{literal}\r\n location / {\r\n proxy_pass http://backend;\r\n proxy_set_header Host $host;\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n client_max_body_size 10m;\r\n client_body_buffer_size 128k;\r\n \r\n proxy_buffering on;\r\n proxy_connect_timeout 15;\r\n proxy_intercept_errors on; \r\n }\r\n} {/literal}', 0, '', 'nginx_https_vhost_template', 1),
(9425, 18017, 'Nginx HTTPS Vhost Template', 'textarea', 1, '{literal}server { {/literal}\r\n listen 443;\r\n server_name {$host} www.{$host} {$server_alias};\r\n \r\n ssl on;\r\n ssl_certificate /etc/aws/keys/ssl/https.crt;\r\n ssl_certificate_key /etc/aws/keys/ssl/https.key;\r\n\r\n ssl_session_timeout 10m;\r\n ssl_session_cache shared:SSL:10m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n{literal}\r\n location / {\r\n proxy_pass http://backend;\r\n proxy_set_header Host $host;\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n client_max_body_size 10m;\r\n client_body_buffer_size 128k;\r\n \r\n proxy_buffering on;\r\n proxy_connect_timeout 15;\r\n proxy_intercept_errors on; \r\n }\r\n} {/literal}', 0, '', 'nginx_https_vhost_template', 1),
(9426, 18018, 'Nginx HTTPS Vhost Template', 'textarea', 1, '{literal}server { {/literal}\r\n listen 443;\r\n server_name {$host} www.{$host} {$server_alias};\r\n \r\n ssl on;\r\n ssl_certificate /etc/aws/keys/ssl/https.crt;\r\n ssl_certificate_key /etc/aws/keys/ssl/https.key;\r\n\r\n ssl_session_timeout 10m;\r\n ssl_session_cache shared:SSL:10m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n{literal}\r\n location / {\r\n proxy_pass http://backend;\r\n proxy_set_header Host $host;\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n client_max_body_size 10m;\r\n client_body_buffer_size 128k;\r\n \r\n proxy_buffering on;\r\n proxy_connect_timeout 15;\r\n proxy_intercept_errors on; \r\n }\r\n} {/literal}', 0, '', 'nginx_https_vhost_template', 1),
(9427, 18619, 'Nginx HTTPS Vhost Template', 'textarea', 1, '{literal}server { {/literal}\r\n listen 443;\r\n server_name {$host} www.{$host} {$server_alias};\r\n \r\n ssl on;\r\n ssl_certificate /etc/aws/keys/ssl/https.crt;\r\n ssl_certificate_key /etc/aws/keys/ssl/https.key;\r\n\r\n ssl_session_timeout 10m;\r\n ssl_session_cache shared:SSL:10m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n{literal}\r\n location / {\r\n proxy_pass http://backend;\r\n proxy_set_header Host $host;\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n client_max_body_size 10m;\r\n client_body_buffer_size 128k;\r\n \r\n proxy_buffering on;\r\n proxy_connect_timeout 15;\r\n proxy_intercept_errors on; \r\n }\r\n} {/literal}', 0, '', 'nginx_https_vhost_template', 1),
(9428, 18620, 'Nginx HTTPS Vhost Template', 'textarea', 1, '{literal}server { {/literal}\r\n listen 443;\r\n server_name {$host} www.{$host} {$server_alias};\r\n \r\n ssl on;\r\n ssl_certificate /etc/aws/keys/ssl/https.crt;\r\n ssl_certificate_key /etc/aws/keys/ssl/https.key;\r\n\r\n ssl_session_timeout 10m;\r\n ssl_session_cache shared:SSL:10m;\r\n\r\n ssl_protocols SSLv2 SSLv3 TLSv1;\r\n ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;\r\n ssl_prefer_server_ciphers on;\r\n{literal}\r\n location / {\r\n proxy_pass http://backend;\r\n proxy_set_header Host $host;\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n\r\n client_max_body_size 10m;\r\n client_body_buffer_size 128k;\r\n \r\n proxy_buffering on;\r\n proxy_connect_timeout 15;\r\n proxy_intercept_errors on; \r\n }\r\n} {/literal}', 0, '', 'nginx_https_vhost_template', 1);
delete from `role_properties`
where (id between 6953 and 7076)
or (id between 12862 and 14913)
or (id between 14915 and 14916)
or (id between 14920 and 15350)
or (id between 15356 and 15358)
or id = 15361;
delete from `role_properties` where id in (16618,16615);
INSERT INTO `role_properties` (`id`, `role_id`, `name`, `value`) VALUES
(17353, 16163, 'system.ssh-port', '22'),
(17393, 25958, 'system.ssh-port', '22'),
(17401, 25957, 'system.ssh-port', '22'),
(18325, 38240, 'system.ssh-port', '22'),
(18326, 38244, 'system.ssh-port', '22'),
(18327, 38241, 'system.ssh-port', '22'),
(18328, 38243, 'system.ssh-port', '22'),
(18330, 38245, 'system.ssh-port', '22'),
(18333, 38246, 'system.ssh-port', '22'),
(18344, 38242, 'system.ssh-port', '22'),
(18390, 38356, 'system.ssh-port', '22'),
(18391, 38354, 'system.ssh-port', '22'),
(18403, 38355, 'system.ssh-port', '22'),
(18404, 38353, 'system.ssh-port', '22'),
(18953, 18617, 'system.ssh-port', '22'),
(18954, 18619, 'system.ssh-port', '22'),
(18955, 18615, 'system.ssh-port', '22'),
(18956, 25955, 'system.ssh-port', '22'),
(18957, 26539, 'system.ssh-port', '22'),
(18958, 24154, 'system.ssh-port', '22'),
(18960, 27506, 'system.ssh-port', '22'),
(18961, 31024, 'system.ssh-port', '22'),
(18962, 18621, 'system.ssh-port', '22'),
(18963, 18620, 'system.ssh-port', '22'),
(18964, 18618, 'system.ssh-port', '22'),
(18965, 25952, 'system.ssh-port', '22'),
(18966, 24151, 'system.ssh-port', '22'),
(18967, 26542, 'system.ssh-port', '22'),
(18968, 27481, 'system.ssh-port', '22'),
(18969, 31011, 'system.ssh-port', '22'),
(18970, 33205, 'system.ssh-port', '22'),
(18971, 18622, 'system.ssh-port', '22'),
(18981, 18624, 'system.ssh-port', '22'),
(19004, 16164, 'system.ssh-port', '22'),
(19018, 18015, 'system.ssh-port', '22'),
(19019, 18017, 'system.ssh-port', '22'),
(19021, 27507, 'system.ssh-port', '22'),
(19040, 18018, 'system.ssh-port', '22'),
(19043, 18016, 'system.ssh-port', '22'),
(19046, 33206, 'system.ssh-port', '22'),
(19048, 18368, 'system.ssh-port', '22'),
(19097, 16161, 'system.ssh-port', '22'),
(19098, 16162, 'system.ssh-port', '22'),
(19099, 18367, 'system.ssh-port', '22'),
(19215, 26543, 'system.ssh-port', '22'),
(19216, 27482, 'system.ssh-port', '22'),
(19218, 26544, 'system.ssh-port', '22'),
(19235, 39551, 'system.ssh-port', '22'),
(19246, 39552, 'system.ssh-port', '22');
delete from `role_security_rules`
where id between 0 and 1391
or id between 1397 and 1436
or id between 1445 and 1452
or id between 16165 and 16182
or id between 21869 and 45804;
update `role_software`
set software_name = 'RabbitMQ 2.7.0'
where id = 23856;
update `role_software`
set software_key = 'RabbitMQ 2.7.0'
where id = 23856;
delete from `role_tags`
where id between 0 and 11464
order by id;
INSERT INTO `role_tags` (`id`, `role_id`, `tag`) VALUES
(14799, 16161, 'ec2.ebs'),
(14800, 16162, 'ec2.ebs'),
(12470, 16163, 'ec2.ebs'),
(14687, 16164, 'ec2.ebs'),
(14706, 18015, 'ec2.ebs'),
(14737, 18016, 'ec2.ebs'),
(14707, 18017, 'ec2.ebs'),
(14732, 18018, 'ec2.ebs'),
(14803, 18367, 'ec2.ebs'),
(14745, 18368, 'ec2.ebs'),
(14600, 18615, 'ec2.ebs'),
(9180, 18616, 'ec2.ebs'),
(14595, 18617, 'ec2.ebs'),
(14617, 18618, 'ec2.ebs'),
(14598, 18619, 'ec2.ebs'),
(14615, 18620, 'ec2.ebs'),
(14613, 18621, 'ec2.ebs'),
(14628, 18622, 'ec2.ebs'),
(9171, 18623, 'ec2.ebs'),
(14641, 18624, 'ec2.ebs'),
(1589, 22461, 'ec2.ebs'),
(1590, 22461, 'ec2.hvm'),
(14621, 24151, 'ec2.ebs'),
(14605, 24154, 'ec2.ebs'),
(9810, 24156, 'ec2.ebs'),
(9803, 24159, 'ec2.ebs'),
(2612, 25052, 'ec2.ebs'),
(2615, 25056, 'ec2.ebs'),
(2684, 25162, 'ec2.ebs'),
(2685, 25163, 'ec2.ebs'),
(14619, 25952, 'ec2.ebs'),
(14601, 25955, 'ec2.ebs'),
(12544, 25957, 'ec2.ebs'),
(12526, 25958, 'ec2.ebs'),
(14604, 26539, 'ec2.ebs'),
(14623, 26542, 'ec2.ebs'),
(14922, 26543, 'ec2.ebs'),
(14926, 26544, 'ec2.ebs'),
(14624, 27481, 'ec2.ebs'),
(14923, 27482, 'ec2.ebs'),
(14610, 27506, 'ec2.ebs'),
(14709, 27507, 'ec2.ebs'),
(5607, 28917, 'ec2.ebs'),
(5609, 28921, 'ec2.ebs'),
(5610, 28922, 'ec2.ebs'),
(5612, 28925, 'ec2.ebs'),
(14625, 31011, 'ec2.ebs'),
(14611, 31024, 'ec2.ebs'),
(14626, 33205, 'ec2.ebs'),
(14742, 33206, 'ec2.ebs'),
(10909, 35144, 'ec2.ebs'),
(10910, 35144, 'ec2.hvm'),
(13763, 38240, 'ec2.ebs'),
(13765, 38241, 'ec2.ebs'),
(13784, 38242, 'ec2.ebs'),
(13766, 38243, 'ec2.ebs'),
(13764, 38244, 'ec2.ebs'),
(13768, 38245, 'ec2.ebs'),
(13772, 38246, 'ec2.ebs'),
(13876, 38353, 'ec2.ebs'),
(13850, 38354, 'ec2.ebs'),
(13874, 38355, 'ec2.ebs'),
(13848, 38356, 'ec2.ebs'),
(14955, 39551, 'ec2.ebs'),
(14975, 39552, 'ec2.ebs');