Skip to content

Commit

Permalink
Change default port of backend to 7007 due to MacOS Control Center up…
Browse files Browse the repository at this point in the history
…date

Signed-off-by: Otto Sichert <git@ottosichert.de>
  • Loading branch information
ottosichert committed Nov 18, 2021
1 parent fb03c47 commit b23bc7f
Show file tree
Hide file tree
Showing 73 changed files with 137 additions and 137 deletions.
4 changes: 2 additions & 2 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
backstage:
image: tugboatqa/node:lts
expose: 7000
expose: 7007
default: true
commands:
init:
Expand All @@ -14,4 +14,4 @@ services:
- yarn workspace example-app build
start:
# wget the endpoint. Will retry every 2 seconds. 30 retries = 1m for service to come up. Plenty.
- wget -O /dev/null -o /dev/null --tries=30 --timeout=5 --retry-connrefused http://localhost:7000
- wget -O /dev/null -o /dev/null --tries=30 --timeout=5 --retry-connrefused http://localhost:7007
4 changes: 2 additions & 2 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ app:
title: '#backstage'

backend:
baseUrl: http://localhost:7000
baseUrl: http://localhost:7007
listen:
port: 7000
port: 7007
database:
client: sqlite3
connection: ':memory:'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
backend:
lighthouseHostname: {{ include "lighthouse.serviceName" . | quote }}
listen:
port: {{ .Values.appConfig.backend.listen.port | default 7000 }}
port: {{ .Values.appConfig.backend.listen.port | default 7007 }}
database:
client: {{ .Values.appConfig.backend.database.client | quote }}
connection:
Expand Down
4 changes: 2 additions & 2 deletions contrib/chart/backstage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ backend:
repository: martinaif/backstage-k8s-demo-backend
tag: 20210423T1550
pullPolicy: IfNotPresent
containerPort: 7000
containerPort: 7007
serviceType: ClusterIP
postgresCertMountEnabled: true
resources:
Expand Down Expand Up @@ -96,7 +96,7 @@ appConfig:
backend:
baseUrl: https://demo.example.com
listen:
port: 7000
port: 7007
cors:
origin: https://demo.example.com
database:
Expand Down
10 changes: 5 additions & 5 deletions contrib/docker/devops/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ docker_name_prefix := backstage-make
# to the host computer
frontend_port := 3000
frontend_host_port := 3000
backend_port := 7000
backend_host_port := 7000
backend_port := 7007
backend_host_port := 7007

# path to this "makefile"
my_dir_path = $(dir $(CURDIR)/$(firstword $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
Expand Down Expand Up @@ -191,10 +191,10 @@ test: check-tests
check: check-code check-docs check-type-dependencies check-styles

# run development instance
# BUG: the frontend seems to run on "$(backend_port)" (7000 default).
# BUG: the frontend seems to run on "$(backend_port)" (7007 default).
# The documentation states "This is going to start two things,
# the frontend (:3000) and the backend (:7000)."
# However, the frontend seems to end up running on 7000.
# the frontend (:3000) and the backend (:7007)."
# However, the frontend seems to end up running on 7007.
.PHONY: dev
dev: build
@docker run --rm -it \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ spec:
image: spotify/backstage-backend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 7000
- containerPort: 7007
name: backend
protocol: TCP
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ backend:
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 7000
port: 7007
ingress:
enabled: false
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ spec:
component: backend
ports:
- name: backend
port: 7000
port: 7007
protocol: TCP
targetPort: backend
2 changes: 1 addition & 1 deletion cypress/cypress.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"baseUrl": "http://localhost:7000",
"baseUrl": "http://localhost:7007",
"integrationFolder": "./src/integration",
"supportFile": "./src/support",
"fixturesFolder": "./src/fixtures",
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/add-auth-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ name.

### Test the new provider

You can `curl -i localhost:7000/api/auth/providerA/start` and which should
You can `curl -i localhost:7007/api/auth/providerA/start` and which should
provide a `302` redirect with a `Location` header. Paste the url from that
header into a web browser and you should be able to trigger the authorization
flow.
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/atlassian/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Name your integration and click on the `Create` button.

Settings for local development:

- Callback URL: `http://localhost:7000/api/auth/atlassian`
- Callback URL: `http://localhost:7007/api/auth/atlassian`
- Use rotating refresh tokens
- For permissions, you **must** enable `View user profile` for the currently
logged-in user, under `User identity API`
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/auth0/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ provider that can authenticate users using OAuth.
- Application type: Single Page Web Application
4. Click on the Settings tab
5. Add under `Application URIs` > `Allowed Callback URLs`:
`http://localhost:7000/api/auth/auth0/handler/frame`
`http://localhost:7007/api/auth/auth0/handler/frame`
6. Click `Save Changes`

## Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/bitbucket/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Click Add Consumer.
Settings for local development:

- Application name: Backstage (or your custom app name)
- Callback URL: `http://localhost:7000/api/auth/bitbucket`
- Callback URL: `http://localhost:7007/api/auth/bitbucket`
- Other are optional
- (IMPORTANT) **Permissions: Account - Read, Workspace membership - Read**

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/github/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Settings for local development:

- Application name: Backstage (or your custom app name)
- Homepage URL: `http://localhost:3000`
- Authorization callback URL: `http://localhost:7000/api/auth/github`
- Authorization callback URL: `http://localhost:7007/api/auth/github`

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/gitlab/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ should point to your Backstage backend auth handler.
Settings for local development:

- Name: Backstage (or your custom app name)
- Redirect URI: `http://localhost:7000/api/auth/gitlab/handler/frame`
- Redirect URI: `http://localhost:7007/api/auth/gitlab/handler/frame`
- Scopes: read_user

## Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/google/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To support Google authentication, you must create OAuth credentials:
- `Name`: Backstage (or your custom app name)
- `Authorized JavaScript origins`: http://localhost:3000
- `Authorized Redirect URIs`:
http://localhost:7000/api/auth/google/handler/frame
http://localhost:7007/api/auth/google/handler/frame
7. Click Create

## Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/auth/microsoft/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To support Azure authentication, you must create an App Registration:
4. Register an application
- Name: Backstage (or your custom app name)
- Redirect URI: Web >
`http://localhost:7000/api/auth/microsoft/handler/frame`
`http://localhost:7007/api/auth/microsoft/handler/frame`
5. Navigate to **Certificates & secrets > New client secret** to create a secret

## Configuration
Expand Down
4 changes: 2 additions & 2 deletions docs/auth/okta/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ To add Okta authentication, you must create an Application from Okta:
- `App integration name`: `Backstage` (or your custom app name)
- `Grant type`: `Authorization Code` & `Refresh Token`
- `Sign-in redirect URIs`:
`http://localhost:7000/api/auth/okta/handler/frame`
- `Sign-out redirect URIs`: `http://localhost:7000`
`http://localhost:7007/api/auth/okta/handler/frame`
- `Sign-out redirect URIs`: `http://localhost:7007`
- `Controlled access`: (select as appropriate)
- Click Save

Expand Down
2 changes: 1 addition & 1 deletion docs/auth/onelogin/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To support OneLogin authentication, you must create an Application:
3. Click Save
4. Go to the Configuration tab for the Application and set:
- `Login Url`: `http://localhost:3000`
- `Redirect URIs`: `http://localhost:7000/api/auth/onelogin/handler/frame`
- `Redirect URIs`: `http://localhost:7007/api/auth/onelogin/handler/frame`
5. Click Save
6. Go to the SSO tab for the Application and set:
- `Token Endpoint` > `Authentication Method`: `POST`
Expand Down
4 changes: 2 additions & 2 deletions docs/conf/writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ app:
baseUrl: http://localhost:3000

backend:
listen: 0.0.0.0:7000
baseUrl: http://localhost:7000
listen: 0.0.0.0:7007
baseUrl: http://localhost:7007

organization:
name: CNCF
Expand Down
8 changes: 4 additions & 4 deletions docs/deployment/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ docker image build . -f packages/backend/Dockerfile --tag backstage
To try out the image locally you can run the following:

```sh
docker run -it -p 7000:7000 backstage
docker run -it -p 7007:7007 backstage
```

You should then start to get logs in your terminal, and then you can open your
browser at `http://localhost:7000`
browser at `http://localhost:7007`

## Multi-stage Build

Expand Down Expand Up @@ -208,11 +208,11 @@ docker image build -t backstage .
To try out the image locally you can run the following:

```sh
docker run -it -p 7000:7000 backstage
docker run -it -p 7007:7007 backstage
```

You should then start to get logs in your terminal, and then you can open your
browser at `http://localhost:7000`
browser at `http://localhost:7007`

## Separate Frontend

Expand Down
14 changes: 7 additions & 7 deletions docs/deployment/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 7000
containerPort: 7007
envFrom:
- secretRef:
name: postgres-secrets
Expand All @@ -361,11 +361,11 @@ spec:
# https://backstage.io/docs/plugins/observability#health-checks
# readinessProbe:
# httpGet:
# port: 7000
# port: 7007
# path: /healthcheck
# livenessProbe:
# httpGet:
# port: 7000
# port: 7007
# path: /healthcheck
```

Expand Down Expand Up @@ -449,7 +449,7 @@ spec:
```

The `selector` here is telling the Service which pods to target, and the port
mapping translates normal HTTP port 80 to the backend http port (7000) on the
mapping translates normal HTTP port 80 to the backend http port (7007) on the
pod.

Apply this Service to the Kubernetes cluster:
Expand All @@ -464,10 +464,10 @@ reveal**_, you can forward a local port to the service:

```shell
$ sudo kubectl port-forward --namespace=backstage svc/backstage 80:80
Forwarding from 127.0.0.1:80 -> 7000
Forwarding from 127.0.0.1:80 -> 7007
```

This shows port 7000 since `port-forward` doesn't _really_ support services, so
This shows port 7007 since `port-forward` doesn't _really_ support services, so
it cheats by looking up the first pod for a service and connecting to the mapped
pod port.

Expand All @@ -486,7 +486,7 @@ organization:
backend:
baseUrl: http://localhost
listen:
port: 7000
port: 7007
cors:
origin: http://localhost
```
Expand Down
4 changes: 2 additions & 2 deletions docs/features/techdocs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ techdocs:
# (Optional and Legacy) TechDocs makes API calls to techdocs-backend using this URL. e.g. get docs of an entity, get metadata, etc.
# You don't have to specify this anymore.

requestUrl: http://localhost:7000/api/techdocs
requestUrl: http://localhost:7007/api/techdocs

# (Optional and Legacy) Just another route in techdocs-backend where TechDocs requests the static files from. This URL uses an HTTP middleware
# to serve files from either a local directory or an External storage provider.
# You don't have to specify this anymore.

storageUrl: http://localhost:7000/api/techdocs/static/docs
storageUrl: http://localhost:7007/api/techdocs/static/docs
```
2 changes: 1 addition & 1 deletion docs/getting-started/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ the project root. Make sure you have run the above mentioned commands first.
$ yarn dev
```

This is going to start two things, the frontend (:3000) and the backend (:7000).
This is going to start two things, the frontend (:3000) and the backend (:7007).

This should open a local instance of Backstage in your browser, otherwise open
one of the URLs printed in the terminal.
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ guide to do a repository-based installation.
- `docker` [installation](https://docs.docker.com/engine/install/)
- `git` [installation](https://github.com/git-guides/install-git)
- If the system is not directly accessible over your network, the following
ports need to be opened: 3000, 7000
ports need to be opened: 3000, 7007

### Create your Backstage App

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/running-backstage-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ cd packages/backend
yarn start
```

That starts up a backend instance on port 7000.
That starts up a backend instance on port 7007.

In the other window, we will then launch the frontend. This command is run from
the project root, not inside the backend directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi/definitions/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ externalDocs:
description: Backstage official documentation
url: https://github.com/backstage/backstage/blob/master/docs/README.md
servers:
- url: http://localhost:7000/api/auth/
- url: http://localhost:7007/api/auth/
tags:
- name: provider
description: List of endpoints per provider
Expand Down
6 changes: 3 additions & 3 deletions docs/plugins/backend-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ cd plugins/carmen-backend
yarn start
```

This will think for a bit, and then say `Listening on :7000`. In a different
This will think for a bit, and then say `Listening on :7007`. In a different
terminal window, now run

```sh
curl localhost:7000/carmen/health
curl localhost:7007/carmen/health
```

This should return `{"status":"ok"}`. Success! Press `Ctrl + c` to kill it
Expand Down Expand Up @@ -107,7 +107,7 @@ root), you should be able to fetch data from it.

```sh
# Note the extra /api here
curl localhost:7000/api/carmen/health
curl localhost:7007/api/carmen/health
```

This should return `{"status":"ok"}` like before. Success!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

const API_ENDPOINT = 'http://localhost:7000/api/search/query';
const API_ENDPOINT = 'http://localhost:7007/api/search/query';

describe('SearchPage', () => {
describe('Given a search context with a term, results, and filter values', () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/app/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ describe('App', () => {
data: {
app: {
title: 'Test',
support: { url: 'http://localhost:7000/support' },
support: { url: 'http://localhost:7007/support' },
},
backend: { baseUrl: 'http://localhost:7000' },
backend: { baseUrl: 'http://localhost:7007' },
lighthouse: {
baseUrl: 'http://localhost:3003',
},
techdocs: {
storageUrl: 'http://localhost:7000/api/techdocs/static/docs',
storageUrl: 'http://localhost:7007/api/techdocs/static/docs',
},
},
context: 'test',
Expand Down
Loading

0 comments on commit b23bc7f

Please sign in to comment.