Vue Storefront is now Alokai! Learn More
Migrating to *.alokai.cloud domains

Migrating to *.alokai.cloud domains

NPM

To migrate a repository from the old NPM registry URLs:

  • registrynpm.storefrontcloud.io
  • npmregistry.vuestorefront.cloud

to the new URL npm.alokai.cloud, you need to complete the below steps.

There is no need to change the authorization credetntials - they are the same as with the old URLs.

1. Change the registry URL in the yarn.lock file

This step is only necessary if using Yarn v1. Apart from the package checksum, the yarn.lock file for Yarn v1 contains the registry URL.

To update the URL, run this command (if not on macOS, omit the ”” after -i): sed -i "" 's/registrynpm.storefrontcloud.io/npm.alokai.cloud/g;s/npmregistry.vuestorefront.cloud/npm.alokai.cloud/g' yarn.lock

2. Change the registry URL in the /.npmrc file

Open the file and replace the old registry URL with npm.alokai.cloud

-@vsf-enterprise:registry=https://registrynpm.storefrontcloud.io
+@vsf-enterprise:registry=https://npm.alokai.cloud

and if the newer @alokai scope is used:

-@alokai:registry=https://registrynpm.storefrontcloud.io
+@alokai:registry=https://npm.alokai.cloud

3. Change the registry in CI workflows

For repositories created with the bootstrapper, in the GitHub UI, go to Settings > Secrets & Variables > Actions > Variables tab and edit the NPM_REGISTRY_URL variable. Set its value to https://npm.alokai.cloud

Go to the .github/workflows/continuous-delivery.yml file and find the Configure NPM registry step. Edit it like below:

      - name: Configure NPM registry
        run: |
          npm install -g npm-cli-login;
-          npm-cli-login -u ${{ secrets.NPM_USER || vars.NPM_USER }} -p ${{ secrets.NPM_PASS }} -e ${{ secrets.NPM_EMAIL || vars.NPM_EMAIL }} -r https://registrynpm.storefrontcloud.io || exit 1;
+          npm-cli-login -u ${{ secrets.NPM_USER || vars.NPM_USER }} -p ${{ secrets.NPM_PASS }} -e ${} -r https://npm.alokai.cloud || exit 1;
-          npm config set @vsf-enterprise:registry=https://registrynpm.storefrontcloud.io/
+          npm config set @vsf-enterprise:registry=https://npm.alokai.cloud
-          npm config set @alokai:registry=https://registrynpm.storefrontcloud.io/
+          npm config set @alokai:registry=https://npm.alokai.cloud

Do the same in .github/actions/setup/action.yml:

     - name: Configure NPM registry
       shell: bash
       run: |
         npm install -g npm-cli-login;
-        npm-cli-login -u ${{ inputs.npm_user }} -p ${{ inputs.npm_password }} -e ${{ inputs.npm_email }} -r https://registrynpm.storefrontcloud.io || exit 1;
+        npm-cli-login -u ${{ inputs.npm_user }} -p ${{ inputs.npm_password }} -e ${{ inputs.npm_email }} -r https://npm.alokai.cloud || exit 1;

For repositories created without the use of the bootstrapper, look through the workflows (.yml files) in the .github folder and through the Dockerfiles. Try to find how the customer logs into the npm registry during CI. Most likely the npm-cli-login command is used to log into the repository - it comes from an NPM package with the same name. Edit the registry URL that is being passed to that command. It could be passed through the -r flag or the NPM_REGISTRY environment variable.

4. Tell developers log into the repository again

Run npm login --registry https://npm.alokai.cloud locally, so that you can download packages using yarn install. This is necessary because the last login’s token in ~/.npmrc still points to the old registry URL that you changed in point 1.

Docker

To migrate a repository from the old Docker registry URLs:

  • registry.storefrontcloud.io
  • registry.vuestorefront.cloud

to the new docker.alokai.cloud URL, you need to complete the below steps.

There is no need to change the authorization credetntials - they are the same as with the old URLs.

Update Docker registry URL in CI workflows

For repositories created using the boostrapper, in the GitHub UI, go to Settings > Secrets & Variables > Actions > Variables and edit the value of DOCKER_REGISTRY_URL. Change its value to docker.alokai.cloud

For repositories created without the bootstrapper, inspect the .yml files in the .github folder manually and replace the Docker registry URLs.

Farmer

Migrating the Farmer URL is only appplicable to legacy projects that send requests to Farmer directly. The latest Alokai storefronts bootstrapped using the Alokai CLI also use the CLI to deploy the Storefront using yarn store deploy [...] - in that case, updating the Farmer URL is not necessary.

If your CI/CD pipelines query the Farmer URL directly, to migrate a repository from the old Farmer URLs:

  • farmer.storefrontcloud.io
  • farmer.vuestorefront.cloud

to the new farmer.alokai.cloud URL, you need to replace the URLs within the pipelines where you query GET /deploy_check/{project}/{tag}, DELETE /flush_cache/{project} and PATCH /v2.2./instance/{namespace} . The underlying service is the same, just with a differebnt domain name. There is no need to change the authorization credetntials - they are the same as with the old URLs.