2.3) Setup hasura/local-development on Windows 10

ALOK SHAKYA
5 min readJul 17, 2017

--

In second week my third task was to setup hasura local-development. Till now I found this task very difficult for me because it had Internet dependency. I was able to complete this task in my 4th attempt.

In my first attemp my Jio 1GB intenet expired and it stopped at last step of sync.

After that I retried by cleaning it and deleting it by running commands

hasuractl local clean

hasuractl local delete

But unfortunately I got error both times.

After that I connected laptop to college wi-fi and uninstalled Virtual Box and started from very beginning and this worked for me.

Below are the steps which I followed in my 4th attempt:

Step 1: Uninstall Virtual Box if you have already installed it before and then again install fresh one. You can download it from link.

Step 2: Install git-bash which I explained in my previous blog 2.1) Setup dev environment

Step 3: Install hasuractl

Download hasuractl.exe and place it in your folder hasura in C drive.

Step 4: Install latest kubectl

Download kubectl.exe from link and place inside folder hasura in C drive.

Step 5: Set Path Variable

Set up path variable by This PC →Properties → Advanced System Settings →Environment Variables →Under system variables click on Path → Edit →Paste address of folder that is C:\hasura →OK

Setting Path Variable

And Path is set to your hasuractl and cubectl.

Step 6: Create an account on beta.hasura.io if you do not have one.

You sign up on beta.hasura.io by providing email and password, an link will be sent to your email to verify your email. Then verify email by logging into your email.

After you have completed these steps you can now start real work.

Step 7: Run git bash with admin privileges.

Step 8: Type command hasuractl login this will prompt you to login into your account using your hasura credentials. Once login successful you can proceed to further steps.

Step 9: Type command hasuractl local start this is the most crucial command I think every one gets trouble in this step only because this command will roughly download about 1–1.5GB of docker images. So have patience and good amount of Internet data.

I got stuck in this step because I ran out of internet data in first attemp. Then I tried again from step 1 and completed this task.

Below are some screen shots of this process:

After successful login and started downloading
Downloading Docker Images
This is the step where in first attempt failed and I had to start again from fresh
Last step of this step

When you got this message on screen then your local development is completed. In the next steps you have login using your credentials.

Step 10: Login to local development

Type the url http://console.c100.hasura.me in url bar and hit enter you will get screen.

Login Screen

Step 11: Login using username as admin and password provided to you.

Logging In

Step 12: After login you will see this screen

local development screen

In this way I finally set up my hasura local development on windows 10 64 bit.

Now questions come into our mind why we have used Virtual Box and What is virtual box?

What is Virtual Box?

VirtualBox is a cross-platform virtualization application which means it installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. Secondly, it extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time. So, for example, you can run Windows and Linux on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC, and so on, all alongside your existing applications. You can install and run as many virtual machines as you like — the only practical limits are disk space and memory.

Why is virtualization useful?

The techniques and features that VirtualBox provides are useful for several scenarios:

Running multiple operating systems simultaneously. VirtualBox allows you to run more than one operating system at a time. This way, you can run software written for one operating system on another (for example, Windows software on Linux or a Mac) without having to reboot to use it.

Easier software installations. Software vendors can use virtual machines to ship entire software configurations. For example, installing a complete mail server solution on a real machine can be a tedious task.

Testing and disaster recovery. Once installed, a virtual machine and its virtual hard disks can be considered a “container” that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts.

Infrastructure consolidation. Virtualization can significantly reduce hardware and electricity costs. Most of the time, computers today only use a fraction of their potential power and run with low average system loads.

In my next blog I will explain about Data Modelling.

Thanks for reading.

Previous Next

--

--