load_data.rake 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # frozen_string_literal: true
  2. namespace :load_data do
  3. desc 'Load accounts into the neo4j container'
  4. task :accounts do
  5. puts 'loading accounts'
  6. j = NeoInfra::Accounts.new
  7. j.load
  8. end
  9. desc 'Load VPCs into the neo4j container'
  10. task :vpcs do
  11. puts 'loading vpcs'
  12. j = NeoInfra::Vpcs.new
  13. j.load
  14. end
  15. desc 'Load VPC Peers into the neo4j container'
  16. task :peer do
  17. puts 'loading vpc peers'
  18. j = NeoInfra::Vpcs.new
  19. j.load_peers
  20. end
  21. desc 'Load Region and Availability Zone information'
  22. task :regions do
  23. puts 'loading regions'
  24. j = NeoInfra::Aws.new
  25. j.load_regions
  26. end
  27. desc 'Load S3 Buckets'
  28. task :buckets do
  29. puts 'loading buckets'
  30. j = NeoInfra::Aws.new
  31. j.load_buckets
  32. end
  33. desc 'Load Nodes'
  34. task :nodes do
  35. puts 'loading nodes'
  36. j = NeoInfra::Nodes.new
  37. j.load_nodes
  38. end
  39. desc 'Load RDS'
  40. task :rds do
  41. puts 'loading rds'
  42. j = NeoInfra::Aws.new
  43. j.load_rds
  44. end
  45. desc 'Load Security Groups'
  46. task :security_groups do
  47. puts 'loading Security Groups'
  48. j = NeoInfra::Aws.new
  49. j.load_security_groups
  50. end
  51. desc 'Load Dynamo'
  52. task :dynamo do
  53. puts 'loading Dynamo'
  54. j = NeoInfra::Aws.new
  55. j.load_dynamo
  56. end
  57. desc 'Load Lambdas'
  58. task :lambda do
  59. puts 'loading Lambdas'
  60. j = NeoInfra::Aws.new
  61. j.load_lambda
  62. end
  63. desc 'Load SQS'
  64. task :sqs do
  65. puts 'loading SQS'
  66. j = NeoInfra::Aws.new
  67. j.load_queues
  68. end
  69. desc 'Load Everything'
  70. task all: %i[accounts regions vpcs peer buckets security_groups nodes rds dynamo lambda sqs]
  71. end