Search…
⌃K

Try Velocity Labs

1. Create a free Velocity account

Open the Velocity UI and register using your Google Account.

2. Create a sample environment

After registering, you can create a sample Velocity Environment and deploy it to Velocity's sandbox cluster in two different ways.

Option 1: Create an environment from the Velocity UI

Click "Create a sample environment"

Option 2: Create an environment with the Velocity CLI

1. Install the CLI

macOS
Linux
Windows
# via Homebrew
brew install techvelocity/tap/veloctl
# or with a script
curl -fsSL https://releases.velocity.tech/veloctl/latest.sh | sh -s
# Via snapcraft
sudo snap install veloctl --classic
# or with a script
curl -fsSL https://releases.velocity.tech/veloctl/latest.sh | sh -s

2. Authenticate to Velocity

veloctl auth login
Running “auth login” will automatically open your browser for device confirmation. Follow the instructions and continue after you have successfully confirmed your device.

3. Create the sample environment using a remote blueprint file

veloctl env create -f https://raw.githubusercontent.com/techvelocity/getting-started-app/main/sample.yaml sample

4. Open your environment dashboard

Wait until the environment is ready, and use the link to open the Velocity dashboard of your environment.

3. Track your remote environment

Once your Velocity Environment is created, you can open the environment page to see a diagram of the services including their deployment status and dependencies.
Notice the status icons next to each service. A green icon indicates that the service has completed provisioning and is in ready state.
You can click on the services to see more details such as environment variables, image definitions and more.

4. Develop a service on your local machine connected to the remote environment

The sample application deployed in your Velocity Environment consists of various services written in the following languages in order to try out Velocity with your preferred language and IDE.
Language
Instructions
Golang
Python
Coming Soon!
Javascript
Coming Soon!
Java
Coming Soon!
C#
Coming Soon!
Velocity is not language specific.
While we're still working on demos for different languages, you can try our Golang demo.

Develop the "Catalog" service, written in Golang

Pre-Requisites:

  1. 1.
    Make sure you have go installed:
    • Run go version, you should see the following output go version go<your_version> <your_kernel>
    • If you do not have go installed, please install it by following the instructions.
  2. 2.
    Clone the sample application:
    1. 1.
      Create a target folder for your clone
    2. 2.
      Run git clone to pull the application code to your target folder
git clone https://github.com/techvelocity/getting-started-app.git
3. If you haven't yet done so, install Velocity CLI
macOS
Linux
Windows
# via Homebrew
brew install techvelocity/tap/veloctl
# or with a script
curl -fsSL https://releases.velocity.tech/veloctl/latest.sh | sh -s
# Via snapcraft
sudo snap install veloctl --classic
# or with a script
curl -fsSL https://releases.velocity.tech/veloctl/latest.sh | sh -s
Once installed, login to your Velocity account:
veloctl auth login
Running “auth login” will automatically open your browser for device confirmation. Follow the instructions and continue after you successfully confirmed your device.

Develop a Golang service locally:

1. Set your current environment (only for environments created from the Velocity UI)
Open a terminal and run the following:
veloctl env current set sample
This will set sample(the created environment name) as your current development environment.
2. Change directories to the catalog service
Open a terminal and cd to:
getting-started-app/src/productcatalogservice
3. Run the catalog service locally
To start the service locally, run:
veloctl env develop --randomize-used-ports -s catalog -- go run .
4. Open your remote front end application in the browser and watch it communicate with your local service
  • Get the Public URI of the front end application, by navigating to the environment dashboard in Velocity's UI (See the image below), or by running veloctl env status
  • Click on the Public URI for your frontend service
The frontend will fetch the products list from your local catalog service.
Notice that the catalog service is now running on your local machine. The tunnel was created when you executed env develop
5. Check your catalog service output in your terminal
You should see the following output:
{"message": “Successfully parsed product catalog json” ...}
6. Terminate the local catalog service
Type CTRL+C in the same terminal you've been working in.
7. See your local changes reflected in the remote, sample environment

Try changing the catalog service, by changing your code locally.

  1. 1.
    Open the products.json file and change the following line, as follows:
"name": "Sunglasses",
"name": "<Your_Name> Sunglasses",
2. Save your changes.
3. Run the following again:
veloctl env develop --randomize-used-ports -s catalog -- go run .
4. Refresh the UI and see your changes
Terminate the local service again, by running CTRL+C
5. Refresh the UI in your web browser, and see that your changes have been reverted, because the local version of the catalog service was terminated.
🎉
Awesome Work!
🎉
Now you know how Velocity can spin up a Production-Like environment, and allow you to develop code on your local machine connected to the remote environment. Want to hear more? Contact us and we will be happy to answer your questions. https://velocity.tech/request-a-demo