Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // File: seeds/dev/applications_servers.js
- 'use strict';
- exports.seed = function( knex, Promise ) {
- let table = 'applications_servers';
- return Promise.join(
- // Removing the deletion, to avoid constraint errors
- // (until we can get the insert working)
- //knex( table ).del(),
- knex.insert( [
- // lpweb01: Apache, PHP, Chef Client
- { created_at: knex.fn.now(), server_id: 1, application_id: 1 },
- { created_at: knex.fn.now(), server_id: 1, application_id: 4 },
- { created_at: knex.fn.now(), server_id: 1, application_id: 9 },
- // lpngnx01: Nginx, PHP, Chef Client
- { created_at: knex.fn.now(), server_id: 9, application_id: 3 },
- { created_at: knex.fn.now(), server_id: 9, application_id: 4 },
- { created_at: knex.fn.now(), server_id: 9, application_id: 9 },
- // ldjen02: Jenkins, Chef Client
- { created_at: knex.fn.now(), server_id: 2, application_id: 5 },
- { created_at: knex.fn.now(), server_id: 2, application_id: 9 },
- // lpnag01 & lpnag02: Nagios, Chef Client
- { created_at: knex.fn.now(), server_id: 3, application_id: 2 },
- { created_at: knex.fn.now(), server_id: 3, application_id: 9 },
- { created_at: knex.fn.now(), server_id: 4, application_id: 2 },
- { created_at: knex.fn.now(), server_id: 4, application_id: 9 },
- // lqchef01: Chef Server
- { created_at: knex.fn.now(), server_id: 5, application_id: 6 },
- // wpdir01 & wpdir02: Active Directory
- { created_at: knex.fn.now(), server_id: 6, application_id: 8 },
- { created_at: knex.fn.now(), server_id: 7, application_id: 8 },
- // lptwst01: Tumbleweed, Chef Client
- { created_at: knex.fn.now(), server_id: 8, application_id: 7 },
- { created_at: knex.fn.now(), server_id: 8, application_id: 9 },
- // lscacti01: Cacti, Chef Client,
- { created_at: knex.fn.now(), server_id: 11, application_id: 9 },
- { created_at: knex.fn.now(), server_id: 11, application_id: 12 },
- // wqbatch01: Batch Server
- { created_at: knex.fn.now(), server_id: 10, application_id: 10 },
- // lqrhds01 & lqrhds02: LDAP, Chef Client
- { created_at: knex.fn.now(), server_id: 12, application_id: 11 },
- { created_at: knex.fn.now(), server_id: 13, application_id: 8 },
- { created_at: knex.fn.now(), server_id: 12, application_id: 11 },
- { created_at: knex.fn.now(), server_id: 13, application_id: 8 },
- // wsbamboo01: Bamboo
- { created_at: knex.fn.now(), server_id: 14, application_id: 13 }
- ]).into( table )
- );
- };
Add Comment
Please, Sign In to add comment