config.sample.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 max-len */
  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 = "/"
  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. endpoints: coriolisUrl + "coriolis/endpoints",
  39. coriolis: coriolisUrl + "coriolis",
  40. migrations: coriolisUrl + "coriolis/migrations",
  41. barbican: coriolisUrl + "barbican"
  42. }
  43. export const providerType = {
  44. "import_migration": 1,
  45. "export_migration": 2,
  46. "import_replica": 4,
  47. "export_replica": 8,
  48. "endpoint": 16
  49. }
  50. export const useSecret = false; // flag to use secret_ref for endpoints
  51. export const tasksPollTimeout = 5000 // milliseconds
  52. export const migrationSteps = [
  53. {
  54. name: "Migration Type",
  55. title: "Migration Options",
  56. component: "WizardMigrationType"
  57. },
  58. {
  59. name: "Source Cloud",
  60. title: "Select your source cloud",
  61. component: "WizardSource"
  62. },
  63. {
  64. name: "Target Cloud",
  65. title: "Select your target cloud",
  66. component: "WizardTarget"
  67. },
  68. {
  69. name: "Migrate instances",
  70. title: "Select instances",
  71. component: "WizardVms"
  72. },
  73. {
  74. name: "Network Mapping",
  75. title: "Network Mapping",
  76. component: "WizardNetworks"
  77. },
  78. {
  79. name: "Options",
  80. title: "Options",
  81. component: "WizardOptions"
  82. },
  83. {
  84. name: "Schedule",
  85. title: "Schedule",
  86. component: "WizardSchedule"
  87. },
  88. {
  89. name: "Summary",
  90. title: "Summary",
  91. component: "WizardSummary"
  92. }
  93. ]
  94. export const auth = {
  95. jwt: { secret: process.env.JWT_SECRET || 'Coriolis' },
  96. // https://developers.facebook.com/
  97. facebook: {
  98. id: process.env.FACEBOOK_APP_ID || '186244551745631',
  99. secret: process.env.FACEBOOK_APP_SECRET || 'a970ae3240ab4b9b8aae0f9f0661c6fc',
  100. },
  101. // https://cloud.google.com/console/project
  102. google: {
  103. id: process.env.GOOGLE_CLIENT_ID || '251410730550-ahcg0ou5mgfhl8hlui1urru7jn5s12km.apps.googleusercontent.com',
  104. secret: process.env.GOOGLE_CLIENT_SECRET || 'Y8yR9yZAhm9jQ8FKAL8QIEcd',
  105. },
  106. // https://apps.twitter.com/
  107. twitter: {
  108. key: process.env.TWITTER_CONSUMER_KEY || 'Ie20AZvLJI2lQD5Dsgxgjauns',
  109. secret: process.env.TWITTER_CONSUMER_SECRET || 'KTZ6cxoKnEakQCeSpZlaUCJWGAlTEBJj0y2EMkUBujA7zWSvaQ',
  110. },
  111. };
  112. export const defaultLabels = {
  113. "username": "Username",
  114. "password": "Password",
  115. "host": "Host",
  116. "port": "Port",
  117. "allow_untrusted": "Allow untrusted",
  118. "identity_api_version": "Identity Version",
  119. "auth_url": "Auth URL",
  120. "user_domain_name": "User Domain Name",
  121. "project_name": "Project Name",
  122. "project_domain_name": "Project Domain Name",
  123. "flavor_name": "Flavor Name",
  124. "hypervisor_type": "Hypervisor Type",
  125. "container_format": "Container Format",
  126. "disk_format": "Disk Format",
  127. "glance_upload": "Glance Upload",
  128. "keypair_name": "Keypair name",
  129. "fip_pool_name": "Floating IP Pool",
  130. "migr_fip_pool_name": "Migration Floating IP Pool",
  131. "migr_flavor_name": "Migration Flavor Name",
  132. "migr_image_name": "Migration Image Name",
  133. "migr_image_name_map": "Migration Image Name Map",
  134. "delete_disks_on_vm_termination": "Delete disks on VM termination",
  135. "set_dhcp": "Set DHCP",
  136. }