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

Use backstage-operator to install backstage #61

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

masayag
Copy link
Contributor

@masayag masayag commented Feb 11, 2024

The PR changes the installation method of Janus-IDP from helm-based to an operator-based.
The configuration for backstage is split between several configmaps according to the sections in app-config.

@masayag
Copy link
Contributor Author

masayag commented Feb 11, 2024

@jianrongzhang89 can you have a look and see if this is the correct way to go?
Specifically, I'm trying to figure out if using the operator, there is also community catalog operator and if there is a need to explicitly create the Backstage kind (as in this sample https://github.com/janus-idp/operator/blob/72962ea8d6f37226142d7609e9087c486624a622/config/samples/_v1alpha1_backstage.yaml#L2)

@masayag masayag force-pushed the rhdh-operator branch 2 times, most recently from f7f64e4 to b67dfa0 Compare February 12, 2024 09:16
@jianrongzhang89
Copy link
Contributor

@jianrongzhang89 can you have a look and see if this is the correct way to go? Specifically, I'm trying to figure out if using the operator, there is also community catalog operator and if there is a need to explicitly create the Backstage kind (as in this sample https://github.com/janus-idp/operator/blob/72962ea8d6f37226142d7609e9087c486624a622/config/samples/_v1alpha1_backstage.yaml#L2)

When the RHDH operator is released, it will be a certified Red Hat operator. It will NOT be released as an community operator.

@jianrongzhang89
Copy link
Contributor

@masayag I tried to install the chart based on the instruction but got error:
helm install orchestrator orchestrator
--set "backstage.upstream.backstage.appConfig.integrations.github[0].host"=github.com
--set "backstage.upstream.backstage.appConfig.integrations.github[0].token"=$GITHUB_TOKEN

Error: INSTALLATION FAILED: no SonataFlowPlatform with the name "sonataflow-platform" found

@masayag
Copy link
Contributor Author

masayag commented Feb 13, 2024

@masayag I tried to install the chart based on the instruction but got error: helm install orchestrator orchestrator --set "backstage.upstream.backstage.appConfig.integrations.github[0].host"=github.com --set "backstage.upstream.backstage.appConfig.integrations.github[0].token"=$GITHUB_TOKEN

Error: INSTALLATION FAILED: no SonataFlowPlatform with the name "sonataflow-platform" found

@jianrongzhang89 just to make sure I'm reproducing the same setup, did you create the DB before?

@jianrongzhang89
Copy link
Contributor

@masayag I tried to install the chart based on the instruction but got error: helm install orchestrator orchestrator --set "backstage.upstream.backstage.appConfig.integrations.github[0].host"=github.com --set "backstage.upstream.backstage.appConfig.integrations.github[0].token"=$GITHUB_TOKEN
Error: INSTALLATION FAILED: no SonataFlowPlatform with the name "sonataflow-platform" found

@jianrongzhang89 just to make sure I'm reproducing the same setup, did you create the DB before?

Yes the DB was created. Did you test the PR on a fresh cluster?

@masayag
Copy link
Contributor Author

masayag commented Feb 14, 2024

@masayag I tried to install the chart based on the instruction but got error: helm install orchestrator orchestrator --set "backstage.upstream.backstage.appConfig.integrations.github[0].host"=github.com --set "backstage.upstream.backstage.appConfig.integrations.github[0].token"=$GITHUB_TOKEN
Error: INSTALLATION FAILED: no SonataFlowPlatform with the name "sonataflow-platform" found

@jianrongzhang89 just to make sure I'm reproducing the same setup, did you create the DB before?

Yes the DB was created. Did you test the PR on a fresh cluster?

not on a fresh cluster. but made sure to clean the resources. I'll try on a fresh one.

@jianrongzhang89
Copy link
Contributor

@masayag I tried to install the chart based on the instruction but got error: helm install orchestrator orchestrator --set "backstage.upstream.backstage.appConfig.integrations.github[0].host"=github.com --set "backstage.upstream.backstage.appConfig.integrations.github[0].token"=$GITHUB_TOKEN
Error: INSTALLATION FAILED: no SonataFlowPlatform with the name "sonataflow-platform" found

@jianrongzhang89 just to make sure I'm reproducing the same setup, did you create the DB before?

Yes the DB was created. Did you test the PR on a fresh cluster?

not on a fresh cluster. but made sure to clean the resources. I'll try on a fresh one.

If you test on an existing cluster, make sure you remove all related CRDs before rerun your test. Note that when an operator is undeployed, the CRDs remain in the cluster by default.

@jianrongzhang89
Copy link
Contributor

@jianrongzhang89 can you have a look and see if this is the correct way to go? Specifically, I'm trying to figure out if using the operator, there is also community catalog operator and if there is a need to explicitly create the Backstage kind (as in this sample https://github.com/janus-idp/operator/blob/72962ea8d6f37226142d7609e9087c486624a622/config/samples/_v1alpha1_backstage.yaml#L2)

Yes, you will need to create a RHDH Backstage custom resource (after the operator is deployed) in order to deploy Backstage.

@masayag masayag force-pushed the rhdh-operator branch 10 times, most recently from def42bf to 6f63f86 Compare February 15, 2024 19:47
@masayag
Copy link
Contributor Author

masayag commented Feb 15, 2024

@jianrongzhang89 can you have a look and see if this is the correct way to go? Specifically, I'm trying to figure out if using the operator, there is also community catalog operator and if there is a need to explicitly create the Backstage kind (as in this sample https://github.com/janus-idp/operator/blob/72962ea8d6f37226142d7609e9087c486624a622/config/samples/_v1alpha1_backstage.yaml#L2)

Yes, you will need to create a RHDH Backstage custom resource (after the operator is deployed) in order to deploy Backstage.

With the updated version of the chart I'm able to get the backstage instance to start, but it fails to load the orchestrator and the notification plugins. I'll check this earliest next week.

However, one thing I could bypass is the environment set always to production, no matter what type of method I tried to override it.

@masayag masayag force-pushed the rhdh-operator branch 4 times, most recently from 8d7b0dd to 47e3979 Compare February 18, 2024 19:03
@masayag masayag force-pushed the rhdh-operator branch 6 times, most recently from abe9656 to 55d8f74 Compare February 19, 2024 20:27
@masayag masayag removed the WIP label Feb 19, 2024
@masayag masayag force-pushed the rhdh-operator branch 4 times, most recently from 59f322a to 00cc8ef Compare February 20, 2024 09:24
@masayag masayag changed the title Use rhdh-operator to install backstage Use backstage-operator to install backstage Feb 20, 2024
Copy link
Contributor

@pkliczewski pkliczewski left a comment

Choose a reason for hiding this comment

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

/lgtm

metadata:
name: rhdh-operator
namespace: {{ .Values.rhdhOperator.subscription.namespace }}
spec:
Copy link
Contributor

Choose a reason for hiding this comment

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

If you want to simplify the template and the documentation and, at the same time, provide more flexibility so that new sub-fields can be added if needed, you can just have a single structured JSON object representing the full configuration and then install it as:

spec:
{{ toYaml .Values.subscription.spec | indent 2 }}

Then you can provide a default in your values.yaml with a sample data. (in the above example should be under rhdhOperator.subscription.spec, of course you can name it as you prefer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to leave this one as is for now since the other operators follow the same method. We can re-work this in the future to have the same way to configure all of the components.

Copy link
Contributor

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

lgtm, will approve after a quick validation on my cluster

Copy link
Contributor

@dmartinol dmartinol left a comment

Choose a reason for hiding this comment

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

validated locally: apart from the notifications which are broken (as expected, IIUC), all looks good.

Copy link

openshift-ci bot commented Feb 20, 2024

New changes are detected. LGTM label has been removed.

Signed-off-by: Moti Asayag <masayag@redhat.com>
@masayag masayag merged commit 0771364 into parodos-dev:main Feb 20, 2024
1 check passed
@masayag masayag deleted the rhdh-operator branch April 7, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants