Skip to content

Commit

Permalink
Merge pull request backstage#322 from cmpadden/feat/change-default-port
Browse files Browse the repository at this point in the history
Change default backend port from 7000 to 7007
  • Loading branch information
Irma12 committed Dec 21, 2021
2 parents 80a77b4 + c9059c3 commit c5c953c
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 34 deletions.
12 changes: 12 additions & 0 deletions .changeset/metal-bulldogs-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'app': patch
'@roadiehq/backstage-plugin-argo-cd-backend': patch
'@roadiehq/backstage-plugin-aws-lambda': patch
'@roadiehq/backstage-plugin-buildkite': patch
'@roadiehq/backstage-plugin-github-insights': patch
'@roadiehq/scaffolder-backend-module-http-request': patch
---

Change default port of backend from 7000 to 7007.

This is due to the AirPlay Receiver process occupying port 7000 and preventing local Backstage instances on MacOS to start.
6 changes: 3 additions & 3 deletions app-config.production.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
app:
# Should be the same as backend.baseUrl when using the `app-backend` plugin
baseUrl: http://localhost:7000
baseUrl: http://localhost:7007

backend:
baseUrl: http://localhost:7000
baseUrl: http://localhost:7007
listen:
port: 7000
port: 7007
4 changes: 2 additions & 2 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ organization:
name: My Company

backend:
baseUrl: http://localhost:7000
baseUrl: http://localhost:7007
listen:
port: 7000
port: 7007
csp:
connect-src: ["'self'", 'http:', 'https:']
cors:
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/integration/AWS-lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'os';
describe('AWS Lambda', () => {
beforeEach(() => {
cy.saveGithubToken();
cy.intercept('GET', 'http://localhost:7000/api/aws/credentials', { fixture: 'AWSLambda/AWSCredentials.json' })
cy.intercept('GET', 'http://localhost:7007/api/aws/credentials', { fixture: 'AWSLambda/AWSCredentials.json' })
cy.intercept('GET', 'https://lambda.eu-west-1.amazonaws.com/2015-03-31/functions/HelloWorld', { fixture: 'AWSLambda/AWSLambdaResponse.json' })
cy.visit('/catalog/default/component/sample-service')
})
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/integration/ArgoCD.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Travis CI', () => {
cy.saveGithubToken();
cy.intercept(
'GET',
'http://localhost:7000/api/proxy/argocd/api/applications/test-app',
'http://localhost:7007/api/proxy/argocd/api/applications/test-app',
{ fixture: 'ArgoCD/applications-test-app.json' },
);
cy.visit('/catalog/default/component/sample-service');
Expand Down
10 changes: 5 additions & 5 deletions packages/app/cypress/integration/bugsnag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import 'os';
describe('Bugsnag', () => {
beforeEach(() => {
cy.saveGithubToken();
cy.intercept('GET', ' http://localhost:7000/api/proxy/bugsnag/api/user/organizations', { fixture: 'Bugsnag/organisations.json' })
cy.intercept('GET', 'http://localhost:7000/api/proxy/bugsnag/api/organizations/129876sdfgh/projects', { fixture: 'Bugsnag/projects.json' })
cy.intercept('GET', 'http://localhost:7000/api/proxy/bugsnag/api/projects/0987qwert!!/errors', { fixture: 'Bugsnag/errors.json' })
cy.intercept('GET', 'localhost:7000/api/proxy/bugsnag/api/projects/0987qwert!!/errors/123456qwerty!!/trend?&buckets_count=10', { fixture: 'Bugsnag/trends.json' })
cy.intercept('GET', 'localhost:7000/api/proxy/bugsnag/api/projects/0987qwert!!/errors/123456qwerty2!!/trend?&buckets_count=10', { fixture: 'Bugsnag/trends.json' })
cy.intercept('GET', ' http://localhost:7007/api/proxy/bugsnag/api/user/organizations', { fixture: 'Bugsnag/organisations.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/bugsnag/api/organizations/129876sdfgh/projects', { fixture: 'Bugsnag/projects.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/bugsnag/api/projects/0987qwert!!/errors', { fixture: 'Bugsnag/errors.json' })
cy.intercept('GET', 'localhost:7007/api/proxy/bugsnag/api/projects/0987qwert!!/errors/123456qwerty!!/trend?&buckets_count=10', { fixture: 'Bugsnag/trends.json' })
cy.intercept('GET', 'localhost:7007/api/proxy/bugsnag/api/projects/0987qwert!!/errors/123456qwerty2!!/trend?&buckets_count=10', { fixture: 'Bugsnag/trends.json' })
cy.visit('/catalog/default/component/sample-service')
})

Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/integration/buildkite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'os';
describe('Buildkite', () => {
beforeEach(() => {
cy.saveGithubToken();
cy.intercept('GET', 'http://localhost:7000/api/proxy/buildkite/api/organizations/exampleorganization/pipelines/exampleproject/builds?page=1&per_page=5 ', { fixture: 'buildkite/builds.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/buildkite/api/organizations/exampleorganization/pipelines/exampleproject/builds?page=1&per_page=5 ', { fixture: 'buildkite/builds.json' })
cy.visit('/catalog/default/component/sample-service-3')
})

Expand Down
8 changes: 4 additions & 4 deletions packages/app/cypress/integration/jira.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import 'os';
describe('Jira plugin', () => {
beforeEach(() => {
cy.saveGithubToken()
cy.intercept('GET', 'http://localhost:7000/api/proxy/jira/api/rest/api/latest/project/TEST', { fixture: 'jira/project.json' })
cy.intercept('GET', 'http://localhost:7000/api/proxy/jira/api/activity?maxResults=25&streams=key+IS+TEST&os_authType=basic', { fixture: 'jira/activitystream.xml' })
cy.intercept('POST', 'http://localhost:7000/api/proxy/jira/api/rest/api/latest/search',{ fixture: 'jira/searchresult.json' })
cy.intercept('GET', 'http://localhost:7000/api/proxy/jira/api/rest/api/latest/statuses',{ fixture: 'jira/statuses.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/jira/api/rest/api/latest/project/TEST', { fixture: 'jira/project.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/jira/api/activity?maxResults=25&streams=key+IS+TEST&os_authType=basic', { fixture: 'jira/activitystream.xml' })
cy.intercept('POST', 'http://localhost:7007/api/proxy/jira/api/rest/api/latest/search',{ fixture: 'jira/searchresult.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/jira/api/rest/api/latest/statuses',{ fixture: 'jira/statuses.json' })
cy.visit('/catalog/default/component/sample-service')
})

Expand Down
6 changes: 3 additions & 3 deletions packages/app/cypress/integration/prometheus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ describe('Prometheus', () => {
cy.saveGithubToken();
cy.intercept(
'GET',
'http://localhost:7000/api/proxy/prometheus/api/rules?type=alert',
'http://localhost:7007/api/proxy/prometheus/api/rules?type=alert',
{ fixture: 'prometheus/alerts.json' },
);
cy.visit('/catalog/default/component/sample-service-3');
cy.intercept(
'GET',
'http://localhost:7000/api/proxy/prometheus/api/query_range?query=node_memory_Active_bytes*',
'http://localhost:7007/api/proxy/prometheus/api/query_range?query=node_memory_Active_bytes*',
{ fixture: 'prometheus/graphs.json' },
);
cy.intercept(
'GET',
'http://localhost:7000/api/proxy/prometheus/api/query_range?query=memUsage*',
'http://localhost:7007/api/proxy/prometheus/api/query_range?query=memUsage*',
{ fixture: 'prometheus/graphs2.json' },
);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/integration/travisCi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import 'os';
describe('Travis CI', () => {
beforeEach(() => {
cy.saveGithubToken();
cy.intercept('GET', 'http://localhost:7000/api/proxy/travisci/api/repo/RoadieHQ%2Fsample-service/builds?offset=0&limit=5', { fixture: 'travisCi/builds.json' })
cy.intercept('GET', 'http://localhost:7007/api/proxy/travisci/api/repo/RoadieHQ%2Fsample-service/builds?offset=0&limit=5', { fixture: 'travisCi/builds.json' })
cy.visit('/catalog/default/component/sample-service-2')
})

Expand Down
2 changes: 1 addition & 1 deletion packages/app/cypress/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const API_BASE_URL = 'http://localhost:7000';
export const API_BASE_URL = 'http://localhost:7007';
4 changes: 2 additions & 2 deletions packages/app/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ describe('App', () => {
{
data: {
app: { title: 'Test' },
backend: { baseUrl: 'http://localhost:7000' },
backend: { baseUrl: 'http://localhost:7007' },
techdocs: {
storageUrl: 'http://localhost:7000/api/techdocs/static/docs',
storageUrl: 'http://localhost:7007/api/techdocs/static/docs',
},
},
context: 'test',
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ yarn start
Substitute `x` for actual values, or leave them as dummy values just to try out
the backend without using the auth or sentry features.

The backend starts up on port 7000 per default.
The backend starts up on port 7007 per default.

## Populating The Catalog

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function startStandaloneServer(
});

const service = createServiceBuilder(module)
.enableCors({ origin: 'http://localhost:7000' })
.enableCors({ origin: 'http://localhost:7007' })
.addRouter('/backstage-plugin-argo-cd-backend', router);

return await service.start().catch(err => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const entityMock = {
],
};

// http://localhost:7000/api/aws/credentials
// http://localhost:7007/api/aws/credentials
export const credentialsResponseMock = {
AccessKeyId: 'test-key-id',
SecretAccessKey: 'test-access-key',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const entityMock = {
],
};

// http://localhost:7000/api/proxy/buildkite/api/organizations/rbnetwork/pipelines/example-pipeline/builds?page=1&per_page=5
// http://localhost:7007/api/proxy/buildkite/api/organizations/rbnetwork/pipelines/example-pipeline/builds?page=1&per_page=5
export const buildsResponseMock = [
{
id: 'a2b1e487-7da1-49c9-977d-a191065677a2',
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('http:backstage:request', () => {
backend: {
baseUrl: mockBaseUrl,
listen: {
port: 7000,
port: 7007,
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('http', () => {
backend: {
baseUrl: mockBaseUrl,
listen: {
port: 7000,
port: 7007,
},
},
});
Expand Down

0 comments on commit c5c953c

Please sign in to comment.