Deploying nio on Google Cloud
If you already have a Google Cloud account you can quickly launch a nio instance on a GCP VM Instance using the GCP Marketplace. If you don’t have an account yet, apply here with your corporate or enterprise email for a $500 GCP credit. Promotion subject to GCP terms and approval.
Step 1 - Deploy the VM Image
- Go to your VM Instances view within the Google Cloud Compute Engine Console.
- Click "Create Instance" at the top.
- On the left menu, select "Marketplace" to deploy a VM from the Marketplace.
- Search for and select "nio".
- Click "Launch on Compute Engine" to launch a VM Instance in your GCP environment
- The default values will work, but if you want to change any of them you can configure your VM instance here. When you're ready, click "Deploy" at the bottom of the screen.
- You will be directed to the Deployment Manager and your nio instance will spin up. This takes a minute or two to launch the VM instance.
- Once the deployment is complete, you will see the info panel on the right populate with your VM instance and deployment details.
- Click on the "Visit the site" button or on your "Site address" to confirm your nio instance is running. If you see a JSON message saying Unauthorized that means it worked! We expect the error here because you are hitting the nio API without any credentials. The error indicates that nio is running though, which is what we care about right now. Next up we'll configure our credentials and connect from the nio System Designer.
Step 2 - Connect to your instance in the System Designer
Now that your nio instance is running in a Google Cloud VM Instance, we'll connect to it from the nio System Designer.
- In a new tab, open up the nio System Designer and log in.
- If you don't have a system already, create one by clicking the add new system button. Give it a name and use the "blank system" system template.
- In your system view, click on "+ add instance" at the top left.
- Add a local instance - give it a name and put your instance's IP address and port 8181 in the host:port field. Even though this instance is running in the cloud, it is considered a "local instance" because you are managing it in your own environment and you connect to it manually.
- Click "accept" - the nio System Designer will connect to your instance. If you see the "create a service" screen then it worked!
Congratulations, you have a nio instance running in your own cloud environment now! This nio instance is fully managed by you but has the benefit of running in the cloud so it is always available.
Connect to your instance's VM to view logs, install blocks/dependencies, and more - click on the SSH button from your GCP deployment view and connect like you would connect to other GCP VM instances.
Check out some other nio workshops to start building - the nio 101 workshops have some cool build ideas that you can use on your new instance.
If you ran into any trouble getting your instance created reach out to us via the blue Intercom chat icon on the bottom right of the System Designer - our support team is here and ready to help!