Migrating Your Workspace To Your Own GitHub Organization with Heroku
Knapsack customers are welcome to maintain their workspace on the provided private GitHub repo within Knapsack's GitHub organization, along with the Heroku pipeline.
However, Enterprise customers have the option of migrating their workspace to their own GitHub Organization and connecting the same (or their own) Heroku pipeline.
To kick off the process, please contact your Knapsack representative, or email email@example.com.
Once Knapsack's Customer Success team contacts you, work with them to complete the process outlined below
- Important: Before beginning the migration process, please install the Knapsack GitHub App. (You must have the proper GitHub Organization permissions to perform this action.)
- To complete the Heroku configuration you will need to install the Heroku CLI (and authenticate after creating an account).
Follow the 8 steps below to complete the process.
- Send an email with your migration request to firstname.lastname@example.org
- Include your GitHub organization so we can initiate the transfer.
- NOTE: Sending this email will help us track your request within our support system.
- Knapsack will kick off the migration process
- You or an organization admin will need to accept the transfer (an email will be generated).
- When the migration is complete update your
package.jsonfiles (root and within the 'packages' directory)
knapsack.config.jswill require an update to
repoOwnerto your organization
package.jsonfiles will need to update the organization name as well as validating all other fields, such as the
- Commit the changes and push back up to the main branch
- Keep an eye on the "Actions" tab for a successful build (which will result in a new release and version bump for all npm packages)
- After verifying everything is building/releasing as it should —> Head over to Heroku to setup deployments
- Configure Heroku with assistance from a Knapsack Solutions Engineer OR by doing the following:
- Create a new pipeline pointing at your newly migrated workspace
- Enable review apps (we recommend destroying stale review apps after 2 days)
- Add a production application
- Use the Heroku CLI —> set your application from the above step to a container (
heroku stack:set container --app your-app-name-here)
- In the "Deploy" section of your app, Enable Automatic Deployments.
- Test Heroku!
- In the "Deploy" section of your app, at the very bottom, click the "Deploy Branch" button
- When Heroku has completed the build
- Click the "Open App" button in the top right to view your new deployment!
- Copy the base URL of your application by right clicking on the "Open App" button and clicking "Copy Link Address"
- Send this over to us so we can point your workspace at your new application deployment.
- This will allow you to access your workspace via the usual http://app.knapsack.cloud/site/[YOUR-WORKSPACE]/latest URL
Wrapping it all up!
After all of the above steps are completed:
- Your workspace will build in the cloud every time a merge is made into the main branch of your repo.
- Since we enabled Review Apps, you'll also get a new deployment for every new PR.
- If a deployment from a PR ever goes stale — simple push changes up to the PR to build a new one!
Issues with this guide or completing a step?
Please let us know or reach out to your Solutions Engineer or email email@example.com