Change default port of backend to 7007 due to MacOS Control Center update

Signed-off-by: Otto Sichert <git@ottosichert.de>
This commit is contained in:
Otto Sichert
2021-11-16 14:58:56 +01:00
parent fb03c47c8b
commit b23bc7f9c3
73 changed files with 137 additions and 137 deletions
+6 -6
View File
@@ -34,7 +34,7 @@ Follow this link, [Create new OAuth App](https://github.com/settings/application
1. Set Application Name to `backstage-dev` or something along those lines.
1. You can set the Homepage URL to whatever you want to.
1. The Authorization Callback URL should match the redirect URI set in Backstage.
1. Set this to `http://localhost:7000/api/auth/github` for local development.
1. Set this to `http://localhost:7007/api/auth/github` for local development.
1. Set this to `http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/github` for non-local deployments.
```bash
@@ -58,7 +58,7 @@ Follow this link, [Add new application](https://gitlab.com/-/profile/application
1. Set Application Name to `backstage-dev` or something along those lines.
1. The Authorization Callback URL should match the redirect URI set in Backstage.
1. Set this to `http://localhost:7000/api/auth/gitlab/handler/frame` for local development.
1. Set this to `http://localhost:7007/api/auth/gitlab/handler/frame` for local development.
1. Set this to `http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/gitlab/handler/frame` for non-local deployments.
1. Select the following scopes from the list:
- [x] `read_user` Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users.
@@ -91,9 +91,9 @@ export AUTH_GITLAB_CLIENT_SECRET=x
Add a new Okta application using the following URI conventions:
Login redirect URI's: `http://localhost:7000/api/auth/okta/handler/frame`
Logout redirect URI's: `http://localhost:7000/api/auth/okta/logout`
Initiate login URI's: `http://localhost:7000/api/auth/okta/start`
Login redirect URI's: `http://localhost:7007/api/auth/okta/handler/frame`
Logout redirect URI's: `http://localhost:7007/api/auth/okta/logout`
Initiate login URI's: `http://localhost:7007/api/auth/okta/start`
Then configure the following environment variables to be used in the `app-config.yaml` file:
@@ -122,7 +122,7 @@ Click [here](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMe
- Give the app a name. e.g. `backstage-dev`
- Select `Accounts in this organizational directory only` under supported account types.
- Enter the callback URL for your backstage backend instance:
- For local development, this is likely `http://localhost:7000/api/auth/microsoft/handler/frame`
- For local development, this is likely `http://localhost:7007/api/auth/microsoft/handler/frame`
- For non-local deployments, this will be `https://{APP_FQDN}:{APP_BACKEND_PORT}/auth/microsoft/handler/frame`
- Click `Register`.
@@ -18,4 +18,4 @@ fi
echo "Downloading and starting SAML-IdP"
export NPM_CONFIG_REGISTRY=https://registry.npmjs.org
exec npx saml-idp --acsUrl "http://localhost:7000/api/auth/saml/handler/frame" --audience "http://localhost:7000" --port 7001
exec npx saml-idp --acsUrl "http://localhost:7007/api/auth/saml/handler/frame" --audience "http://localhost:7007" --port 7001
+1 -1
View File
@@ -63,7 +63,7 @@ Here's how to get the backend up and running:
```
4. Now run `yarn start-backend` from the repo root
5. Finally open `http://localhost:7000/api/azure-devops/health` in a browser and it should return `{"status":"ok"}`
5. Finally open `http://localhost:7007/api/azure-devops/health` in a browser and it should return `{"status":"ok"}`
## Links
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
@@ -73,7 +73,7 @@ describe('createRouter', () => {
config = new ConfigReader({
backend: {
baseUrl: 'http://127.0.0.1',
listen: { port: 7000 },
listen: { port: 7007 },
},
});
discovery = SingleHostDiscovery.fromConfig(config);
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
@@ -59,7 +59,7 @@ describe('DefaultCatalogCollator', () => {
beforeAll(() => {
mockDiscoveryApi = {
getBaseUrl: jest.fn().mockResolvedValue('http://localhost:7000'),
getBaseUrl: jest.fn().mockResolvedValue('http://localhost:7007'),
getExternalBaseUrl: jest.fn(),
};
collator = new DefaultCatalogCollator({ discovery: mockDiscoveryApi });
@@ -67,7 +67,7 @@ describe('DefaultCatalogCollator', () => {
});
beforeEach(() => {
server.use(
rest.get('http://localhost:7000/entities', (req, res, ctx) => {
rest.get('http://localhost:7007/entities', (req, res, ctx) => {
if (req.url.searchParams.has('filter')) {
const filter = req.url.searchParams.get('filter');
if (filter === 'kind=Foo,kind=Bar') {
+6 -6
View File
@@ -31,11 +31,11 @@ POST a Cobertura XML file to `/report`
Example:
```json
// curl -X POST -H "Content-Type:text/xml" -d @cobertura.xml "localhost:7000/api/code-coverage/report?entity=component:default/entity-name&coverageType=cobertura"
// curl -X POST -H "Content-Type:text/xml" -d @cobertura.xml "localhost:7007/api/code-coverage/report?entity=component:default/entity-name&coverageType=cobertura"
{
"links": [
{
"href": "http://localhost:7000/api/code-coverage/report?entity=component:default/entity-name",
"href": "http://localhost:7007/api/code-coverage/report?entity=component:default/entity-name",
"rel": "coverage"
}
]
@@ -49,11 +49,11 @@ POST a JaCoCo XML file to `/report`
Example:
```json
// curl -X POST -H "Content-Type:text/xml" -d @jacoco.xml "localhost:7000/api/code-coverage/report?entity=component:default/entity-name&coverageType=jacoco"
// curl -X POST -H "Content-Type:text/xml" -d @jacoco.xml "localhost:7007/api/code-coverage/report?entity=component:default/entity-name&coverageType=jacoco"
{
"links": [
{
"href": "http://localhost:7000/api/code-coverage/report?entity=component:default/entity-name",
"href": "http://localhost:7007/api/code-coverage/report?entity=component:default/entity-name",
"rel": "coverage"
}
]
@@ -67,7 +67,7 @@ GET `/report`
Example:
```json
// curl localhost:7000/api/code-coverage/report?entity=component:default/entity-name
// curl localhost:7007/api/code-coverage/report?entity=component:default/entity-name
{
"aggregate": {
"branch": {
@@ -111,7 +111,7 @@ GET `/history`
Example
```json
// curl localhost:7000/api/code-coverage/history?entity=component:default/entity-name
// curl localhost:7007/api/code-coverage/history?entity=component:default/entity-name
{
"entity": {
"kind": "Component",
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
@@ -42,7 +42,7 @@ function createDatabase(): PluginDatabaseManager {
const testDiscovery: jest.Mocked<PluginEndpointDiscovery> = {
getBaseUrl: jest
.fn()
.mockResolvedValue('http://localhost:7000/api/code-coverage'),
.mockResolvedValue('http://localhost:7007/api/code-coverage'),
getExternalBaseUrl: jest.fn(),
};
const mockUrlReader = UrlReaders.default({
+1 -1
View File
@@ -11,7 +11,7 @@ TBD
### Generic Requirements
1. Provide OAuth credentials:
1. [Create an OAuth App](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) with the callback URL set to `http://localhost:7000/api/auth/github`.
1. [Create an OAuth App](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/) with the callback URL set to `http://localhost:7007/api/auth/github`.
2. Take the Client ID and Client Secret from the newly created app's settings page and put them into `AUTH_GITHUB_CLIENT_ID` and `AUTH_GITHUB_CLIENT_SECRET` environment variables.
2. Annotate your component with a correct GitHub Actions repository and owner:
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
@@ -34,9 +34,9 @@ describe('createRouter', () => {
const logger = getVoidLogger();
const config = new ConfigReader({
backend: {
baseUrl: 'https://example.com:7000',
baseUrl: 'https://example.com:7007',
listen: {
port: 7000,
port: 7007,
},
},
});
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
+1 -1
View File
@@ -18,7 +18,7 @@ import { getRootLogger } from '@backstage/backend-common';
import yn from 'yn';
import { startStandaloneServer } from './service/standaloneServer';
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7000;
const port = process.env.PLUGIN_PORT ? Number(process.env.PLUGIN_PORT) : 7007;
const enableCors = yn(process.env.PLUGIN_CORS, { default: false });
const logger = getRootLogger();
+2 -2
View File
@@ -227,14 +227,14 @@ export interface Config {
};
/**
* @example http://localhost:7000/api/techdocs
* @example http://localhost:7007/api/techdocs
* @visibility frontend
* @deprecated
*/
requestUrl?: string;
/**
* @example http://localhost:7000/api/techdocs/static/docs
* @example http://localhost:7007/api/techdocs/static/docs
* @deprecated
*/
storageUrl?: string;
+1 -1
View File
@@ -34,7 +34,7 @@ export interface Config {
legacyUseCaseSensitiveTripletPaths?: boolean;
/**
* @example http://localhost:7000/api/techdocs
* @example http://localhost:7007/api/techdocs
* @visibility frontend
* @deprecated
*/