Skip to content

tjvreugdenhil/f5xc-dns-zone-vscode

Repository files navigation

Hey there! My name is TJ 👋

A extremely helpful F5 Solutions Architect

In this repo, we will demonstrate API Management with F5 Distributed Cloud (XC) - DNS using Visual Studio Code

GIF

👨🏻‍💻 PREPARATION

First, we will prepare Visual Studio Code by installing two extensions, creating and copying our F5 XC API token, cloning this GitHub repo for local use, and updating the repo files for your environment.

  1. Download: Visual Studio Code

    visual-studio-code

  2. Install REST Client Extension from the Visual Studio Code Marketplace:

Ctrl + Shift + X -> search for humao.rest-client -> install
REST

Files ending with .http or .rest will automatically be syntax-highlighted

  1. Install Dotenv Official Extension from the Visual Studio Code Marketplace:

Ctrl + Shift + X -> search for dotenv.dotenv-vscode -> install

dotenv

This is used to quickly reference API tokens without exposing API tokens in code.

  1. Create API Token from F5 XC tenant:

    f5xc home

Administration > Personal Management > Credentials > Add Credentials

f5xc-api-token

  1. Clone this github repository by using the git bash terminal in vscode

    git bash

gh repo clone tjvreugdenhil/f5xc-dns-zone-vscode

  1. Rename ".env.sample" from github repo to ".env"

    paste API token into the .env file

    paste f5 XC tenant name into the .env file

🛠 CREATE F5-XC DNS ZONE AND RECORDS

These steps walk through creating a test F5 XC DNS zone, verifying commits, replacing zone records, and deleting the test zone.

  1. Verify F5 DNS Zone does not exist: {Send Request}: "GET f5xc-demo.com.rest"

GET

  1. Create F5 DNS Zone: {Send Request}: "POST f5xc-demo.com zone.rest"

POST

  1. Verify F5 DNS Zone was created: {Send Request}: "GET f5xc-demo.com.rest"

GET

  1. Replace F5 DNS Zone with new records: {Send Request}: "PUT f5xc-demo.com zone.rest"

PUT

200 OK after PUT

f5 dns zone verification

  1. Delete F5 DNS Zone {Send Request}: "DELETE f5xc-demo.com zone.rest"

DELETE

ADDITIONAL INFORMATION:

#POST - Creates DNS Zone. If one already exists, it will give an error.

#PUT - Replaces DNS Zone

#GET - Lists DNS Zone or use "curl GET f5xc-demo.com zone.rest"

#DELETE - Deletes DNS Zone

#If using "f5xc-backup.sh" - install jq for Windows by running this curl in gitbash or the vscode bash terminal

curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe

#Install vscode thunder client extension to build REST collections:

Ctrl + Shift + X -> search for rangav.vscode-thunder-client -> install

#install gitignore for .env file:

Ctrl + Shift + X -> codezombiech.gitignore -> install

About

F5 XC demos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published