Skip to content

Commit

Permalink
docs: Remove/update references to Heroku (#2099)
Browse files Browse the repository at this point in the history
## What

This PR removes or updates references in the docs to Heroku. Most of the code samples have been replaced with a more generic `unleash.example.com` url, while other references have been removed or updated.

Also removes old OpenAPI files that are out of date and redundant with the new generation.

## Background

Come November and Heroku will no longer offer free deployments of Unleash, so it's about time we remove that claim.

Links to the heroku instance are also outdated because we don't have that instance running anymore.

Finally, the OpenAPI files we do have there are old and static, so they don't match the current reality.

## Commits

* Meta: update ignore file to ignore autogenerated docs

I must've missed the ignore file when looking for patterns.

* docs: delete old openapi file.

This seems to have been a holdover from 2020 and is probably
hand-written. It has been superseded by the new autogenerated OpenAPI docs.

* docs: add notes for heroku changes to the frontend readme and pkg

* docs: remove old openapi article and add redirects to new openapi

* docs: fix link in overview doc: point to GitHub instead of heroku

* docs: update quickstart docs with new heroku details

* docs: remove reference to crashing heroku instance

* docs: remove references to herokuapp in  code samples

* docs: add a placeholder comment

* docs: update references for heroku updates

* docs: keep using unleash4 for enterprise

* docs: remove start:heroku script in favor of start:sandbox

* docs: remove 'deploy on heroku button'

Now that it's not free anymore (or won't be very shortly), let's
remove it.

* docs: remove extra newline
  • Loading branch information
thomasheartman committed Oct 19, 2022
1 parent 0e3e725 commit 8916de7
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 1,699 deletions.
1,671 changes: 0 additions & 1,671 deletions docs/api/oas/openapi.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions frontend/README.md
Expand Up @@ -13,14 +13,14 @@ yarn install
yarn run start
```

## Run with a heroku-hosted instance of unleash-api
## Run with a sandbox instance of the Unleash API

Alternatively, instead of running unleash-api on localhost, use a remote instance:
Alternatively, instead of running unleash-api on localhost, you can use a remote instance:

```
cd ~/frontend
yarn install
yarn run start:heroku
yarn run start:sandbox
```

## Running end-to-end tests
Expand All @@ -30,7 +30,7 @@ so it's important that you check these yourself before submitting a PR.
On the server the tests will run against the deployed Heroku app so this is what you probably want to test against:

```
yarn run start:heroku
yarn run start:sandbox
```

In a different shell, you can run the tests themselves:
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Expand Up @@ -13,7 +13,7 @@
"build": "vite build",
"lint": "yarn fmt:check",
"start": "vite",
"start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start",
"start:sandbox": "UNLEASH_API=https://sandbox.getunleash.io/ospro yarn run start",
"start:enterprise": "UNLEASH_API=https://unleash4.herokuapp.com yarn run start",
"start:demo": "UNLEASH_BASE_PATH=/demo/ yarn start",
"test": "tsc && vitest run",
Expand Down
10 changes: 0 additions & 10 deletions website/docs/api/open-api.md

This file was deleted.

2 changes: 1 addition & 1 deletion website/docs/deploy/import-export.md
Expand Up @@ -63,7 +63,7 @@ Example with curl:
```sh
curl -X GET -H "Content-Type: application/json" \
-H "Authorization: Basic YWRtaW46" \
http://unleash.herokuapp.com/api/admin/state/export?&featureToggles=1&strategies=0 > export.json
https://unleash.example.com/api/admin/state/export?&featureToggles=1&strategies=0 > export.json
```

### API Import {#api-import}
Expand Down
2 changes: 0 additions & 2 deletions website/docs/deploy/securing-unleash-v3.md
Expand Up @@ -47,8 +47,6 @@ Examples of custom authentication hooks:
- [basic-auth-hook.js](https://github.com/Unleash/unleash-examples/blob/7ed25f97a31dfd8f773c00847080b1a4c889fd87/v3/securing-basic-auth/basic-auth-hook.js)
- [keycloak-auth-hook.js](https://github.com/Unleash/unleash-examples/blob/7ed25f97a31dfd8f773c00847080b1a4c889fd87/v3/securing-keycloak-auth/keycloak-auth-hook.js)

We also have a version of Unleash deployed on Heroku which uses Google OAuth 2.0: https://secure-unleash.herokuapp.com

## Securing the Client API {#securing-the-client-api}

A common way to support client access is to use pre-shared secrets. This can be solved by having clients send a shared key in an HTTP header with every client request to the Unleash API. All official Unleash clients should support this.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/how-to/how-to-use-custom-strategies.md
Expand Up @@ -65,7 +65,7 @@ The steps to implement a custom strategy for your client depend on the kind of c
}

const instance = initialize({
url: 'http://unleash.herokuapp.com/api/',
url: 'https://unleash.example.com/api/',
appName: 'unleash-demo',
instanceId: '1',
// highlight-next-line
Expand Down
2 changes: 1 addition & 1 deletion website/docs/sdks/go.md
Expand Up @@ -32,7 +32,7 @@ func init() {
unleash.Initialize(
unleash.WithListener(&unleash.DebugListener{}),
unleash.WithAppName("my-application"),
unleash.WithUrl("http://unleash.herokuapp.com/api/"),
unleash.WithUrl("https://unleash.example.com/api/"),
unleash.WithCustomHeaders(http.Header{"Authorization": {"<API token>"}}),
)
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/sdks/java.md
Expand Up @@ -111,7 +111,7 @@ UnleashContextProvider contextProvider = new MyAwesomeContextProvider();
UnleashConfig config = new UnleashConfig.Builder()
.appName("java-test")
.instanceId("instance x")
.unleashAPI("http://unleash.herokuapp.com/api/")
.unleashAPI("https://unleash.example.com/api/")
.unleashContextProvider(contextProvider)
.build();

Expand Down
2 changes: 1 addition & 1 deletion website/docs/sdks/php.md
Expand Up @@ -90,7 +90,7 @@ $contextProvider = new MyAwesomeContextProvider();
$unleash = UnleashBuilder::create()
->withAppName('my.php-app')
->withInstanceId('your-instance-1')
->withAppUrl('http://unleash.herokuapp.com/api/')
->withAppUrl('https://unleash.example.com/api/')
->withContextProvider($contextProvider)
->build();

Expand Down
2 changes: 1 addition & 1 deletion website/docs/user_guide/index.md
Expand Up @@ -62,7 +62,7 @@ The reference docs are organized into the following topics:

## Other resources and communities

💻 The core of Unleash is all open source and [hosted on GitHub](https://www.heroku.com/deploy/?template=https://github.com/Unleash/unleash 'Unleash on GitHub').
💻 The core of Unleash is all open source and [hosted on GitHub](https://github.com/Unleash/unleash/ 'Unleash on GitHub').

💬 If you've got questions or just wanna chat to the team and other Unleash users, come [join our Slack community](https://slack.unleash.run/)

Expand Down
16 changes: 12 additions & 4 deletions website/docs/user_guide/quickstart.md
Expand Up @@ -115,21 +115,29 @@ Now you can fetch the feature toggle you created and try turning it on / off in

If you want to set up your own instance for testing purposes you can easily do so by using one of our premade setup kits for Heroku or DigitalOcean.

> The Heroku instance setup is FREE, and includes a DB to save your state but it will eventually go to sleep when not used. The DigitalOcean setup utilises droplets and will cost you around $10/month to run, but in turn it will not go to sleep. NOTE: If you use the DigitalOcean link below and are a new user, you will receive $100 in FREE credits.
::: info Pricing

### Deploy a free version of Unleash to Heroku
Both DigitalOcean and Heroku will charge you for running Unleash on their services. However, if you use the DigitalOcean link below and are a new user, you will receive $100 in free credits.

:::

### Deploy a paid version of Unleash to Heroku

[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://www.heroku.com/deploy/?template=https://github.com/Unleash/unleash)

### Deploy a paid version of Unleash to DigitalOcean

> You'll receive $100 in free credits if you are a new DigitalOcean user using this link.
:::tip Free credits

You'll receive $100 in free credits if you are a new DigitalOcean user using this link.

:::

[![Deploy to DigitalOcean](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/Unleash/unleash/tree/main&refcode=0e1d75187044)

### Accessing your new instance

Once you have set up the new instance, click the URL provided by either Heroku or DigitalOcean and you'll be taken to the application login screen.
Once you have set up the new instance, follow the URL provided by either Heroku or DigitalOcean and it will take you to the application login screen.

Input the following credentials to log in:

Expand Down
1 change: 0 additions & 1 deletion website/docs/user_guide/unleash_overview.md
Expand Up @@ -13,7 +13,6 @@ Before you can connect your application to Unleash you need a Unleash server. Yo
1. **Unleash Open-source**
- [Docker](../deploy/getting-started.md)
- [Helm Chart](https://github.com/unleash/helm-charts/)
- [Click-to-deploy on Heroku](https://www.heroku.com/deploy/?template=https://github.com/Unleash/unleash)
- [GitLab](https://docs.gitlab.com/ee/operations/feature_flags.html#choose-a-client-library)
2. **Unleash Enterprise**
- [Hosted Plans](https://www.getunleash.io/plans)
Expand Down
4 changes: 4 additions & 0 deletions website/docusaurus.config.js
Expand Up @@ -185,6 +185,10 @@ module.exports = {
from: '/advanced/audit_log',
to: '/reference/event-log',
},
{
from: '/api/open_api',
to: '/reference/api/unleash',
},
],
createRedirects: function (toPath) {
if (
Expand Down

0 comments on commit 8916de7

Please sign in to comment.