diff --git a/ui/admin/app/components/form/worker/create-worker-led/index.js b/ui/admin/app/components/form/worker/create-worker-led/index.js index b1c804d60..3b7bfdc27 100644 --- a/ui/admin/app/components/form/worker/create-worker-led/index.js +++ b/ui/admin/app/components/form/worker/create-worker-led/index.js @@ -108,6 +108,12 @@ ${listenerText} * @type {string} */ get installBoundaryText() { + if (this.features.isEnabled('byow-pki-hcp-cluster-id')) { + return `wget -q https://releases.hashicorp.com/boundary-worker/0.11.2+hcp/boundary-worker_0.11.2+hcp_linux_amd64.zip ;\\ +sudo apt-get update && sudo apt-get install unzip ;\\ +unzip *.zip ;\\ +./boundary-worker server -config="${this.configFilePath || ''}/pki-worker.hcl"`; + } return `curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - ;\\ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" ;\\ sudo apt-get update && sudo apt-get install boundary ;\\ diff --git a/ui/admin/tests/acceptance/workers/create-test.js b/ui/admin/tests/acceptance/workers/create-test.js index e49fac281..2f4c9ae6f 100644 --- a/ui/admin/tests/acceptance/workers/create-test.js +++ b/ui/admin/tests/acceptance/workers/create-test.js @@ -60,6 +60,26 @@ module('Acceptance | workers | create', function (hooks) { assert.dom(labels[2]).hasText('Initial Upstreams'); }); + test('download and install step shows correct oss instructions', async function (assert) { + assert.expect(2); + const featuresService = this.owner.lookup('service:features'); + featuresService.disable('byow-pki-hcp-cluster-id'); + await visit(newWorkerURL); + const createSection = findAll('.worker-create-section'); + assert.dom(createSection[1]).includesText('curl -fsSL'); + assert.dom(createSection[1]).doesNotIncludeText('wget -q'); + }); + + test('download and install step shows correct hcp instructions', async function (assert) { + assert.expect(2); + const featuresService = this.owner.lookup('service:features'); + featuresService.enable('byow-pki-hcp-cluster-id'); + await visit(newWorkerURL); + const createSection = findAll('.worker-create-section'); + assert.dom(createSection[1]).includesText('wget -q'); + assert.dom(createSection[1]).doesNotIncludeText('curl -fsSL'); + }); + test('Users can navigate to new workers route with proper authorization', async function (assert) { assert.expect(2); await visit(newWorkerURL);