Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove/update references to Heroku #2099

Merged
merged 15 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,671 changes: 0 additions & 1,671 deletions docs/api/oas/openapi.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ yarn run start

## Run with a heroku-hosted instance of unleash-api

Alternatively, instead of running unleash-api on localhost, use a remote instance:
<!-- todo: update this after updating the package.json -->
thomasheartman marked this conversation as resolved.
Show resolved Hide resolved

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

```
cd ~/frontend
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "vite build",
"lint": "eslint src --max-warnings 0",
"start": "vite",
"start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start",
"start:heroku": "UNLEASH_API=https://unleash.herokuapp.com yarn run start", // <— what do we here?
thomasheartman marked this conversation as resolved.
Show resolved Hide resolved
"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
2 changes: 1 addition & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ yarn-debug.log*
yarn-error.log*

# OpenAPI docusaurus generated stuff
docs/reference/apis/**/sidebar.js
docs/reference/api/**/sidebar.js
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to a last-minute change in where we generate OpenAPI docs. This change simply makes sure the new generated docs get ignored.

*.api.mdx
*.tag.mdx
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
17 changes: 13 additions & 4 deletions website/docs/user_guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,30 @@ 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: 1 addition & 0 deletions website/docs/user_guide/unleash_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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/)
<!-- todo: what do we do about this? -->
thomasheartman marked this conversation as resolved.
Show resolved Hide resolved
- [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**
Expand Down
4 changes: 4 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ module.exports = {
from: '/advanced/audit_log',
to: '/reference/event-log',
},
{
from: '/api/open_api',
to: '/reference/api/unleash',
},
thomasheartman marked this conversation as resolved.
Show resolved Hide resolved
],
createRedirects: function (toPath) {
if (
Expand Down