Skip to main content

Creating a virtual Windows instance for testing and development

Prerequisites

  1. You need elevated access to install software development tools. Go to My Access and add the privilege app_PMW_PROD-RunElevated-Elevate. When prompted for Business justification, put: Required to install software development tools.
info

Your manager will have to approve this request

Launch Your Windows Instance

  1. Go to the Temporary OnPrem VDI page. Scroll down a bit and click on the Loaner Request button.
warning

The Windows instance (and all of the data) will be deleted after 30 days. You can request an extension, however.

  1. On the Loaner MyOneDesktop VDI Request page, click on the Submit Request button.
info

Requests are typically filled in an hour or two.

info

You can not have more than one Windows VDI instance. If you want a second instance, you must first delete the one you have.

warning

😀 There is no way for you to delete your instance once it is created. You will have to wait 30 days for the instance to be automatically deleted or request that it be deleted sooner (the contact person should be listed in the auto-generated Jira ticket)

You should see a Request Success window:

Request Success

You can click on the MyIT Request ID link to check the status of your request

When your request is filled, You should receive an email with a login link. Login using Chrome or Edge here: https://MyOneDesktop.schwab.com Ignore the Citrix Workspace application that may automatically download. Instead, stay in your web browser:

Citrix Workspace app with instance

you should see an OnPrem VDI Loaner in your Citrix Workspace in the web browser:

  1. Launch your instance by clicking on Open:

Citrix Workspace app launch instance

Obtain Necessary Software

The basic necessary software needed to create and develop with the Next.js docker container is:

  • Docker desktop
  • Visual Studio Code
  • Nextjs-Docker.sh installer
  • Git for windows

Installing Docker Desktop, VS Code And Nextjs-docker.sh

You should be able to install Docker Desktop, VS Code, and the Nextjs-docker.sh script through the Schwab App Store application which is also called BigFix. On the Windows instance, enter BigFix into the search bar and install them:

  • Search for docker and install Docker Desktop
  • Search for visual and install Visual Studio Code
  • Search for nextjs and install the NextJS-Docker.sh - Docker Container Spin Up Utility script

If the nextjs-docker installer does not show up, restart your instance and open BigFix to try again.

Citrix Workspace app launch instance Restart your Windows instance

tip

If you are unable to find the nextjs-docker.sh script, you can download it directly from our Github repo here. The same script is used for both Windows and MacOS.

Installing Git For Windows

Git for Windows requires a special request in order to deploy it on your Windows instance.

Finding your Knumber

  • Enter your KNumber. The entry box should search for the domain associated with your KNumber and show a domain name with it.

Enter your Knumber

  • Click on Full Software List
  • Click on Select.
  • You can enter any search term. Enter git and select Git for Windows Click on the Submit request button

On your Windows instance, go to BigFix and search for git. If you do not see Git for Windows, restart your Windows instance and search again.

Patching Curl On Your Windows Instance

The script that creates the Next.js Docker container requires repeated use of the curl command. The curl command on your Windows instance needs to be patched so that it can access the proper locations. You'll need the Zscaler root certificate from your Mac to configure curl on the Windows instance.

Obtain a copy of the ZScaler root certificate from your Mac:

  • On your Mac, open the application Keychain Access (you'll need to search for it on your Mac).
  • The cert is named ZscalerRootCA.pem.
  • Export the cert to your Mac
Step 1:Step 2:Step 3:
Initial setup screenConfiguration optionsReview settings

Locate, export, and save, your Zscaler Pem Key

Moving The ZscalerRootCA.pem File To Your Windows VDI Instance

You'll need to move the ZscalerRootCA.pem file to your Windows instance.

info

Unfortunately, the Windows VDI instances do not share the copy/paste clipboard or allow direct file transfer between your Mac and the instance.

However, Microsoft Teams and OneDrive are on both your Mac and on the Windows VDI instance with your identity. That gives you two ways to send data:

  • Use Microsoft Teams and send yourself a message with any text or files that you need.
  • Place files in OneDrive.

Curl Fix For Docker Desktop

Once you have the ZscalerRootCA.pem file on your Windows instance, and Git For Windows is installed, you need to create a special file on your Windows instance to fix the networking for Docker Desktop.

  • Open a bash terminal window (enter bash in the search bar and select Git bash)
  • Create this file: ~/.curlrc
  • Edit the .curlrc file and add the two lines below (you can use nano AKA vi to edit it, or open it in Notepad). Make sure that the file ZscalerRootCA.pem is in the location shown below and replace YOUR.NAME with your Schwab user name:
cacert="c:/users/YOUR.NAME/OneDrive - Charles Schwab & Co, Inc/ZscalerRootCA.pem"
proxy=http://127.0.0.1:9000

Creating Your Next.js Docker Container

Launch Docker Desktop. With a Git bash terminal window open, locate the file nextjs-docker-install-latest.sh.

Running the installation shell script

Running the script will take you through the expected flow. You'll need your GitHub and Jira tokens which you'll probably want to copy over from your Mac.

tip

If the script exits prematurely (probably where the first curl command occurs), you probably need to check the curl patch you made earlier

Configure Visual Studio Code And Connect To The Container

Make sure that your container is running in Docker Desktop. Launch VS Code and install the two necessary VS Code extensions:

  • Install Dev Containers

install Dev Containers

  • Install Docker DX

Install Docker DX

After attaching to the container, wait a few minutes. If the container appears hung, go to VS Code's File menu, select Open Folder and open /home/nextjs-web. The usual scripts should execute. There might be an extra Vercel authentication step.