0.1.3 • Published 1 year ago

remote-manage-config-page v0.1.3

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Admin Config UI

Building

Installing dependencies

yarn install

Building

  1. To render different pages on your local server, e.g. IP allow list or Webhook allow list
  2. cd into src/shared/utils/helper.ts and update the following function findConfigPage()
  3. For Dev environment return the config page you want render. Example: Webhook allow list update it to Pages.WebhookAllowList
  4. Run yarn install and yarn build inside the projects/lib/sui-forms directory, as the admin-config-ui project depends on a few projects inside the sui-forms directory.

    • Optionally run yarn install & yarn build commands inside each of the ui-platform projects that admin-config-ui project depends on.
  5. Build the js assets with yarn build.

  6. Start local server with yarn dev.
yarn build # production build
# or
yarn dev # dev build

Troubleshooting

  1. Check your node version

    • It should be >= 16.0.0
    • Hint: use nvm to easily check and switch between different version of node.
  2. Delete the .yarn directory from various locations and retry.

    • Anywhere you've run yarn install or yarn build previously.

Releasing the changes into the SPLCORE/main repo

To release these code changes in the SPLCORE/main repo, we need to generate a new tarball of the admin-config-ui project, upload the same to Artifactory, & finally update the main repo to use this version during it's build time.

Perform the following steps from the root folder i.e. remotes-admin-config-ui/admin-config-ui (a.k.a $ROOT) -

  1. Bump up the minor version in $ROOT/package.json.
  2. Generate & upload the package as a tarball - run yarn gen-tarball:upload.
  3. Note that before you upload, you need to get added to the following GroupIDs -

    • ssg-artif-splunkcore-apps.deploy
    • ssg-artif-splunkcore-apps.read

    More info on getting that access can be found here. You just need to access request from the Groups Self Service page

  4. Enter your AD password to upload the package to artifactory. If the upload is successful you should see the following in your terminal:

     upload_archive.py: uploaded /Users/.../remotes-admin-config-ui/admin-config-ui/remote-manage-config-page-<version>.tar.gz to <https://repo.splunk.com/artifactory/splunkcore-apps/skinny-apps/release/remote-manage-config-page-<version>.tar.gz-<SHA>>; SHA256=8ee9...
     Next steps:
     - copy SHA256
     - inside the "main" repo, open the "$SPLUNK_SOURCE/component_package_manager/components.json" file
     - update the field - version inside "remote-manage-config-page" block to <version>
     - and paste the SHA256 outputted here to the field - sha256
     - commit changes & raise an MR on the "main" repo
  5. Once the upload is successful, the package should be found on Artifactory here. For e.g. remote-manage-config-page-1.0.0.tar.gz.

  6. Kick-off a new cloud build in Chaperone using the above commit. (Make sure to check the "Publish to SplunkCloud" checkbox on the Advanced tab)
  7. Once the build is ready, create a new CO2 stack and test the changes.

Building types

yarn remote-build-tool build

Publishing types

Note: You will typically want to do this from CICD.

yarn remote-build-tool publish