{"__v":9,"_id":"56f97ec8b0cb632200683775","category":{"project":"55c6bec1b9aa4e0d0016c2c3","version":"55c6bec1b9aa4e0d0016c2c6","_id":"56f97e9a4c612020008f2eaf","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-28T18:57:30.798Z","from_sync":false,"order":3,"slug":"migrations","title":"Migrations"},"parentDoc":null,"project":"55c6bec1b9aa4e0d0016c2c3","user":"55c6b99c476be90d00500805","version":{"__v":8,"_id":"55c6bec1b9aa4e0d0016c2c6","project":"55c6bec1b9aa4e0d0016c2c3","createdAt":"2015-08-09T02:45:21.683Z","releaseDate":"2015-08-09T02:45:21.683Z","categories":["55c6bec2b9aa4e0d0016c2c7","56c14bc5826df10d00e82230","56cceed8723ad71d00cae46c","56ccf29a431ada1f00e85aae","56ccf3c28fa8b01b00b82018","56ce1e6ee538330b0021ac5d","56f97e9a4c612020008f2eaf","5734fafd146eb82000597261"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["5707d42bb8993d17005bb897","57238c39fd2e3d0e00fa2638","57c965853e34160e00ef168f","57d9b969da17c30e003897f8","581b9874bdfa410f0087c280","586d28a3c3b2473900855b14"],"next":{"pages":[],"description":""},"createdAt":"2016-03-28T18:58:16.172Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"## 1. Create a Storage Bucket and Folder \n### 1. For Amazon Simple Storage Service (S3)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"S3 Bucket Name: spinnaker\\nS3 Folder Name: front50\",\n      \"language\": \"text\",\n      \"name\": \"Example\"\n    }\n  ]\n}\n[/block]\n### 2. For Google Storage Service (GCS)\nGCS storage buckets must have globally unique names. While the example below uses a user name for illustration purposes, in practice the project name might be a more practical decorator.\n\nIn order to create a bucket, you need to have admin storage scope, or add a  -p <project> flag to create the bucket in another project. See [gsutil documentation](https://cloud.google.com/storage/docs/gsutil) for more info.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"gsutil mb ${USER}-spinnaker-data\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n## 2. Disable Cassandra in front50.yml\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"cassandra:\\n  enabled: false\",\n      \"language\": \"yaml\"\n    }\n  ]\n}\n[/block]\n## 3. Enable Storage Buckets in front50.yml\n### 1. For Amazon Simple Storage Service (S3)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"spinnaker:\\n  s3:\\n    enabled: true\\n    bucket: YOUR_S3_BUCKET_NAME (From Step #1)\\n    rootFolder: YOUR_S3_FOLDER_NAME (From Step #1)\",\n      \"language\": \"yaml\"\n    }\n  ]\n}\n[/block]\n### 2. For Google Storage Service (GCS)\n\nGoogle storage service will use the credentials specified as ${providers.google.primaryCredentials.jsonPath} from spinnaker.yml by default. You can change these by adding different credentials in the jsonPath below. This would be useful if you want to store spinnaker data in a project that is different from the project you are managing.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"spinnaker:\\n  gcs:\\n    enabled: true\\n    bucket: YOUR_GCS_BUCKET_NAME (From Step #1)\\n    rootFolder: front50 (OR ANY OTHER NAME OF YOUR CHOOSING)\\n    jsonPath: (CREDENTIALS TO AUTHENTICATE WITH)\",\n      \"language\": \"yaml\"\n    }\n  ]\n}\n[/block]\n## 4. Export Existing Applications, Pipelines, Strategies, Notifications and Projects\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#!/bin/sh\\n\\nrm applications.json\\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/v2/applications | json_pp > applications.json\\n\\nrm pipelines.json\\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/pipelines | json_pp > pipelines.json\\n\\nrm strategies.json\\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/strategies | json_pp > strategies.json\\n\\nrm notifications.json\\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/notifications | json_pp > notifications.json\\n\\nrm projects.json\\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/v2/projects | json_pp | jq '._embedded.projects' > projects.json\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n## 5. Deploy new Front50\n\n## 6. Import Applications, Pipelines, Strategies, Notifications and Projects\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#!/bin/sh\\n\\ncurl -X POST -H \\\"Content-type: application/json\\\" --data-binary :::at:::\\\"notifications.json\\\" http://FRONT50_HOSTNAME:FRONT50_PORT/notifications/batchUpdate\\ncurl -X POST -H \\\"Content-type: application/json\\\" --data-binary @\\\"strategies.json\\\" http://FRONT50_HOSTNAME:FRONT50_PORT/strategies/batchUpdate\\ncurl -X POST -H \\\"Content-type: application/json\\\" --data-binary @\\\"pipelines.json\\\" http://FRONT50_HOSTNAME:FRONT50_PORT/pipelines/batchUpdate\\ncurl -X POST -H \\\"Content-type: application/json\\\" --data-binary @\\\"applications.json\\\" http://FRONT50_HOSTNAME:FRONT50_PORT/v2/applications/batch/applications\\ncurl -X POST -H \\\"Content-type: application/json\\\" --data-binary @\\\"projects.json\\\" http://FRONT50_HOSTNAME:FRONT50_PORT/v2/projects/batchUpdate\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"front50-cassandra-to-s3","type":"basic","title":"Front50: Cassandra to S3"}

Front50: Cassandra to S3


## 1. Create a Storage Bucket and Folder ### 1. For Amazon Simple Storage Service (S3) [block:code] { "codes": [ { "code": "S3 Bucket Name: spinnaker\nS3 Folder Name: front50", "language": "text", "name": "Example" } ] } [/block] ### 2. For Google Storage Service (GCS) GCS storage buckets must have globally unique names. While the example below uses a user name for illustration purposes, in practice the project name might be a more practical decorator. In order to create a bucket, you need to have admin storage scope, or add a -p <project> flag to create the bucket in another project. See [gsutil documentation](https://cloud.google.com/storage/docs/gsutil) for more info. [block:code] { "codes": [ { "code": "gsutil mb ${USER}-spinnaker-data", "language": "text" } ] } [/block] ## 2. Disable Cassandra in front50.yml [block:code] { "codes": [ { "code": "cassandra:\n enabled: false", "language": "yaml" } ] } [/block] ## 3. Enable Storage Buckets in front50.yml ### 1. For Amazon Simple Storage Service (S3) [block:code] { "codes": [ { "code": "spinnaker:\n s3:\n enabled: true\n bucket: YOUR_S3_BUCKET_NAME (From Step #1)\n rootFolder: YOUR_S3_FOLDER_NAME (From Step #1)", "language": "yaml" } ] } [/block] ### 2. For Google Storage Service (GCS) Google storage service will use the credentials specified as ${providers.google.primaryCredentials.jsonPath} from spinnaker.yml by default. You can change these by adding different credentials in the jsonPath below. This would be useful if you want to store spinnaker data in a project that is different from the project you are managing. [block:code] { "codes": [ { "code": "spinnaker:\n gcs:\n enabled: true\n bucket: YOUR_GCS_BUCKET_NAME (From Step #1)\n rootFolder: front50 (OR ANY OTHER NAME OF YOUR CHOOSING)\n jsonPath: (CREDENTIALS TO AUTHENTICATE WITH)", "language": "yaml" } ] } [/block] ## 4. Export Existing Applications, Pipelines, Strategies, Notifications and Projects [block:code] { "codes": [ { "code": "#!/bin/sh\n\nrm applications.json\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/v2/applications | json_pp > applications.json\n\nrm pipelines.json\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/pipelines | json_pp > pipelines.json\n\nrm strategies.json\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/strategies | json_pp > strategies.json\n\nrm notifications.json\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/notifications | json_pp > notifications.json\n\nrm projects.json\ncurl http://FRONT50_HOSTNAME:FRONT50_PORT/v2/projects | json_pp | jq '._embedded.projects' > projects.json", "language": "shell" } ] } [/block] ## 5. Deploy new Front50 ## 6. Import Applications, Pipelines, Strategies, Notifications and Projects [block:code] { "codes": [ { "code": "#!/bin/sh\n\ncurl -X POST -H \"Content-type: application/json\" --data-binary @\"notifications.json\" http://FRONT50_HOSTNAME:FRONT50_PORT/notifications/batchUpdate\ncurl -X POST -H \"Content-type: application/json\" --data-binary @\"strategies.json\" http://FRONT50_HOSTNAME:FRONT50_PORT/strategies/batchUpdate\ncurl -X POST -H \"Content-type: application/json\" --data-binary @\"pipelines.json\" http://FRONT50_HOSTNAME:FRONT50_PORT/pipelines/batchUpdate\ncurl -X POST -H \"Content-type: application/json\" --data-binary @\"applications.json\" http://FRONT50_HOSTNAME:FRONT50_PORT/v2/applications/batch/applications\ncurl -X POST -H \"Content-type: application/json\" --data-binary @\"projects.json\" http://FRONT50_HOSTNAME:FRONT50_PORT/v2/projects/batchUpdate", "language": "shell" } ] } [/block]