config.sample.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. /*
  2. Copyright (C) 2017 Cloudbase Solutions SRL
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. /* eslint-disable */
  15. /* jscs:disable maximumLineLength */
  16. export const port = process.env.PORT || 3000;
  17. export const host = process.env.WEBSITE_HOSTNAME || `localhost:${port}`;
  18. export const coriolisUrl = CORIOLIS_URL || "/"
  19. export const defaultDomain = "default";
  20. // Number of instances in wizard Migrate VMs step
  21. export const itemsPerPage = 6;
  22. /*
  23. -- Network mocked data
  24. id - random
  25. name - source network
  26. migrateNetwork - target network, null if new network
  27. selected - true
  28. */
  29. export const networkMock = [
  30. { id: "net1", name: "VM Network", migrateNetwork: "management", selected: true} ,
  31. ]
  32. // Target networks to show in dropdown
  33. export const targetNetworkMock = ["internal-coriolis-2", "coriolis-twenty", "management"]
  34. export const securityGroups = ["testgroup"]
  35. export const servicesUrl = {
  36. identity: coriolisUrl + "identity/auth/tokens",
  37. projects: coriolisUrl + "identity/auth/projects",
  38. users: coriolisUrl + "identity/users",
  39. endpoints: coriolisUrl + "coriolis/endpoints",
  40. coriolis: coriolisUrl + "coriolis",
  41. migrations: coriolisUrl + "coriolis/migrations",
  42. barbican: coriolisUrl + "barbican",
  43. openId: coriolisUrl + "identity/OS-FEDERATION/identity_providers/google/protocols/openid/auth"
  44. }
  45. export const providerType = {
  46. import_migration: 1,
  47. export_migration: 2,
  48. import_replica: 4,
  49. export_replica: 8,
  50. endpoint: 16
  51. }
  52. export const useSecret = true; // flag to use secret_ref for endpoints
  53. export const tasksPollTimeout = 5000 // milliseconds
  54. export const migrationSteps = [
  55. {
  56. name: "Migration Type",
  57. title: "Migration Options",
  58. component: "WizardMigrationType"
  59. },
  60. {
  61. name: "Source Cloud",
  62. title: "Select your source cloud",
  63. component: "WizardSource"
  64. },
  65. {
  66. name: "Target Cloud",
  67. title: "Select your target cloud",
  68. component: "WizardTarget"
  69. },
  70. {
  71. name: "Migrate instances",
  72. title: "Select instances",
  73. component: "WizardVms"
  74. },
  75. {
  76. name: "Options",
  77. title: "Options",
  78. component: "WizardOptions"
  79. },
  80. {
  81. name: "Network Mapping",
  82. title: "Network Mapping",
  83. component: "WizardNetworks"
  84. },
  85. {
  86. name: "Schedule",
  87. title: "Schedule",
  88. component: "WizardSchedule"
  89. },
  90. {
  91. name: "Summary",
  92. title: "Summary",
  93. component: "WizardSummary"
  94. }
  95. ]
  96. export const auth = {
  97. jwt: { secret: process.env.JWT_SECRET || 'Coriolis' },
  98. // https://developers.facebook.com/
  99. facebook: {
  100. id: process.env.FACEBOOK_APP_ID || '186244551745631',
  101. secret: process.env.FACEBOOK_APP_SECRET || 'a970ae3240ab4b9b8aae0f9f0661c6fc',
  102. },
  103. // https://cloud.google.com/console/project
  104. google: {
  105. id: process.env.GOOGLE_CLIENT_ID || '251410730550-ahcg0ou5mgfhl8hlui1urru7jn5s12km.apps.googleusercontent.com',
  106. secret: process.env.GOOGLE_CLIENT_SECRET || 'Y8yR9yZAhm9jQ8FKAL8QIEcd',
  107. },
  108. // https://apps.twitter.com/
  109. twitter: {
  110. key: process.env.TWITTER_CONSUMER_KEY || 'Ie20AZvLJI2lQD5Dsgxgjauns',
  111. secret: process.env.TWITTER_CONSUMER_SECRET || 'KTZ6cxoKnEakQCeSpZlaUCJWGAlTEBJj0y2EMkUBujA7zWSvaQ',
  112. },
  113. };
  114. export const defaultLabels = {
  115. username: "Username",
  116. password: "Password",
  117. host: "Host",
  118. port: "Port",
  119. allow_untrusted: "Allow untrusted",
  120. identity_api_version: "Identity Version",
  121. auth_url: "Auth URL",
  122. user_domain_name: "User Domain Name",
  123. project_name: "Project Name",
  124. project_domain_name: "Project Domain Name",
  125. flavor_name: "Flavor Name",
  126. hypervisor_type: "Hypervisor Type",
  127. container_format: "Container Format",
  128. disk_format: "Disk Format",
  129. glance_upload: "Glance Upload",
  130. keypair_name: "Keypair name",
  131. fip_pool_name: "Floating IP Pool",
  132. migr_fip_pool_name: "Migration Floating IP Pool",
  133. migr_flavor_name: "Migration Flavor Name",
  134. migr_image_name: "Migration Image Name",
  135. migr_image_name_map: "Migration Image Name Map",
  136. delete_disks_on_vm_termination: "Delete disks on VM termination",
  137. set_dhcp: "Set DHCP",
  138. }