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

add authentication link to test mode topic #790

Merged
merged 8 commits into from
Jul 17, 2024

Conversation

CaroMac
Copy link
Contributor

@CaroMac CaroMac commented May 8, 2024

No description provided.

@CaroMac CaroMac requested a review from techcobweb May 8, 2024 13:00

## <a name="hybrid"></a>Running a test locally but using shared configuration

When you run a test locally, but using shared configuration, the Galasa bootstrap is set to the URL of the Galasa Ecosystem where the shared configuration is stored. The Galasa framework is launched within the JVM on the local machine, but the framework consults the remote ecosystem to read configuration data, but not the credentials properties as these are drawn from a local file. This is the key difference between running a test in this "hybrid" mode versus running a test locally without using shared configuration. In hybrid mode, the test still runs in the local JVM and all test results and artifacts are stored on the local disk.
When you run a test locally, but using shared configuration, the Galasa bootstrap is set to the URL of the Galasa Ecosystem where the shared configuration is stored. The Galasa framework is launched within the JVM on the local machine, but the framework consults the remote Ecosystem to read configuration data, but not the credentials properties as these are drawn from a local file. This is the key difference between running a test in this "hybrid" mode versus running a test locally without using shared configuration. In hybrid mode, the test still runs in the local JVM and all test results and artifacts are stored on the local disk.
Copy link
Contributor

Choose a reason for hiding this comment

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

the Galasa bootstrap is set to the URL of the Galasa Ecosystem where the shared configuration is stored

Currently that's not true. You need to galasactl auth login to the remote system (which does require a bootstrap), and then unset the bootstrap so that your local bootstrap.properties file is used. Or refer explicitly to the local bootstrap file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

Copy link
Contributor

Choose a reason for hiding this comment

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

0.34.0 Contains a change such that it will do an implicit login, so you don't actually need to login explicitly now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will chat to you about the implicit login changes

- `https://my.ecosystem.url` refers to the Web UI used to allocate tokens and <br>
- `framework.extra.bundles` tells the Galasa framework to load the `dev.galasa.cps.rest` extension. This extension tells the Galasa framework how to handle URLs that start with `galasacps` as the *scheme* part of the URL. <br>

After setting the `GALASA_TOKEN` to be a valid token for the Ecosystem from which the CPS property values will be drawn, you can run a test in hybrid mode by setting your bootstrap to refer to the Ecosystem in which the shared configuration is stored, and using the `galasactl runs submit local` <a href="https://github.com/galasa-dev/cli/blob/main/docs/generated/galasactl_runs_submit_local.md" target="_blank"> Galasa CLI</a> command.
Copy link
Contributor

Choose a reason for hiding this comment

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

After setting the GALASA_TOKEN to be a valid token for the Ecosystem from which the CPS property values will be drawn,

... log into the Ecosystem using galasactl auth login

Then

you can run a test in hybrid mode by setting your bootstrap to refer to the Ecosystem in which the shared configuration is stored,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@CaroMac CaroMac requested a review from techcobweb May 9, 2024 12:06
techcobweb
techcobweb previously approved these changes Jun 3, 2024
@@ -20,13 +20,18 @@ There are three modes in which you can run a Galasa test:<br><br>
- remotely, by submitting the test to run in the Galasa Ecosystem<br>


If you are running a test locally but using a shared configuration that is hosted by the Galasa Ecosystem, or running a test remotely by submitting the test to run in the Galasa Ecosystem, you are interacting with the Galasa Ecosystem.

Before you can interact with the Galasa Ecosystem, you must authenticate with it by using a personal access token. Tokens are stored in the `GALASA_TOKEN` in the `galasactl.properties` in your Galasa home folder. You can request a personal access token by using the Galasa Web UI. For more information about setting up authentication with an Ecosystem, see the [Configuring authentication](../ecosystem/ecosystem-authentication) documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also store the token in an environment variable $GALASA_TOKEN

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just updated


## <a name="hybrid"></a>Running a test locally but using shared configuration

When you run a test locally, but using shared configuration, the Galasa bootstrap is set to the URL of the Galasa Ecosystem where the shared configuration is stored. The Galasa framework is launched within the JVM on the local machine, but the framework consults the remote ecosystem to read configuration data, but not the credentials properties as these are drawn from a local file. This is the key difference between running a test in this "hybrid" mode versus running a test locally without using shared configuration. In hybrid mode, the test still runs in the local JVM and all test results and artifacts are stored on the local disk.
When you run a test locally, but using shared configuration, the Galasa bootstrap is set to the URL of the Galasa Ecosystem where the shared configuration is stored. The Galasa framework is launched within the JVM on the local machine, but the framework consults the remote Ecosystem to read configuration data, but not the credentials properties as these are drawn from a local file. This is the key difference between running a test in this "hybrid" mode versus running a test locally without using shared configuration. In hybrid mode, the test still runs in the local JVM and all test results and artifacts are stored on the local disk.
Copy link
Contributor

Choose a reason for hiding this comment

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

0.34.0 Contains a change such that it will do an implicit login, so you don't actually need to login explicitly now.

KirbyKatcher
KirbyKatcher previously approved these changes Jun 24, 2024
@CaroMac CaroMac dismissed stale reviews from KirbyKatcher and techcobweb via a287c60 June 25, 2024 12:37
@CaroMac CaroMac merged commit dffe235 into galasa-dev:main Jul 17, 2024
9 checks passed
@CaroMac CaroMac deleted the remotecps1813 branch July 17, 2024 09:41
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.

3 participants