Skip to main content

Posts

Showing posts from 2019

Azure Log Analytics Agent will be retired on 31st August 2024. Migrate to Azure Monitor.

Microsoft has announced that the Azure log analytics agent will be retired on 31st August 2024. Customers should migrate to Azure Monitor Agent to monitor their assets.   Announcement : https://azure.microsoft.com/en-us/updates/were-retiring-the-log-analytics-agent-in-azure-monitor-on-31-august-2024/ Migration guide : https://learn.microsoft.com/en-gb/azure/azure-monitor/agents/azure-monitor-agent-migration About Azure Monitor Agent : https://learn.microsoft.com/en-us/azure/azure-monitor/agents/agents-overview  

Data Representation in Rust.

Computer uses a fixed number of bits to represent a piece of data, which could be a number, a character, or symbols. A n-bit storage location can represent up to 2^n different entities. A single bit can encode either 1 or 0. If we combine two bits, it can encode 4 distinct possibilities (00,01,10,11). For example, a 3-bit memory location can hold one of these eight binary patterns: 000, 001, 010, 011, 100, 101, 110, or 111. Hence, it can represent a maximum of 8 distinct entities. It can be also used to represent numbers 0 to 7. A sequence of 8 bits (2^8) is known as a Byte. A byte can form 2^8=256 distinct entities. Integers can be represented in 8-bit, 16-bit, 32-bit or 64-bit. while coding a program, you must choose an appropriate bit-length for your integers. Also, an integer can be represented such as unsigned and signed integers.  Unsigned Integers: can represent zero and positive integers. Signed Integers: can represent zero, positive and negative integers.  An 8-bi

RUST Cargo Package Manager Explained

Simple rust programs like hello world are having smaller source codes and doesn’t have much complexity and dependencies. But while coding larger and complex programs, there will be multiple dependencies and for managing that, it is wise to use Cargo. Cargo is a package manager tool that is used to perform the tasks such as building the code, downloading and building the libraries the code depends. The Cargo is usually included with the Rust installation. But if using IDEs, we need to install the required plugin to support the Cargo. Building a Cargo project Let’s create a new project using Cargo. In this example, I am creating a Cargo package named as ex2_cargo. Cargo new ex2_cargo command will create the cargo package. Once the command is successfully executed, browse in to the newly created ex2_cargo directory. You can see a couple of files and a src folder inside the cargo package directory.     The source code will always reside inside the src folder. .gitignore is

Hello World Rust Program : Code explained

As always, let’s start with the prominent Hello World program as the first exercise. Create a source file with the rust file extension (.rs) Enter the following code in the file and save it. fn main() {     println!("Hello World!"); } Compile the source file from your terminal window, here in this illustration I am using windows command prompt. Then run the successfully compiled executable file. Analysing the Code fn main() {     println!("Hello World!"); } The first line defines a function in Rust. The main function is always the first code that runs in every Rust program. Here in this Hello World example, the main function declares that it has no parameters and returns nothing.  Inside the main function, we have some output to show. Note that, like python, Rust style is to indent with four spaces. println! calls a Rust macro. If the exclamation mark (!) is not used, Rust will consider it as a function. Here we need to print the test on the screen

RUST error: linker `link.exe` not found

While compiling Rust program in a windows environment, you may encounter the error : linker `link.exe` not found. This is because of the absence of the C++ build tools in your machine. For compiling Rust programs successfully, one of the prerequisites is the installation of the Build Tools for Visual Studio 2019.   Download the Visual Studio 2019 Build tools from the Microsoft website. After the download, while installing the Build tools, make sure that you install the required components (highlighted in Yellow) This will download around 1.2GB of required files. Once everything is successfully installed, reboot and re-run your rust program and it will compile successfully.   Read More on RUST Hello World Rust Program : Code explained RUST Cargo Package Manager Explained Data Representation in Rust.

1 Minute Reference : Google Cloud App-Engine

GCP App Engine consist of services, versions, and instances. Services usually provide a single function. Versions means different versions of code running in the App Engine environment. Instances are managed instances running the specific service. How to Deploy? Deploy App Engine using gcloud app deploy command. Also includes configuring the App Engine environment using the app.yaml file. Keep in mind that a project can have only one App Engine app at a time. How to Scale? There are three scaling options. auto-scaling, basic scaling, and manual scaling. Only auto-scaling and basic scaling are dynamic. Manual scaling creates resident instances. Auto-scaling allows for more configuration options than basic scaling. How to Split the traffic? This can be done using gcloud app services set-traffic command. Use ––splits parameter, to specify the percent of traffic to route to each version. How to Migrate the traffic? This can be achieved from the Versions page of the App E

Kubernetes in Google Cloud : Basics Series

Kubernetes Engine is a container orchestration system for deploying applications to run in clusters. Kubernetes uses pods as instances running a container.Multiple containers in a pod is also possible. 1) Set the Zone gcloud config set compute/zone [ZONE_NAME] 2) Create a Kubernetes Cluster gcloud container clusters create [CLUSTER-NAME] 3) After creating your cluster, need to get authentication credentials to interact with the cluster. gcloud container clusters get-credentials [CLUSTER-NAME] 4) Deployment of Service/Applciation : kubectl run command in Cloud Shell to create a new deployment "hello-server" from the hello-app container image: kubectl run hello-server --image=gcr.io/google-samples/hello-app:1.0 --port 8080 In Kubernetes, all containers run in pods. kubectl run command made Kubernetes to create a deployment consisting of a single pod containing the nginx container. A Kubernetes deployment keeps a given number of pods up and running even in the eve

Google Cloud : Basic Cloud Shell commands

Google Cloud resources can be managed in multiple ways. It can be done using Cloud Console, SDK or by using Cloud Shell. A few basic Google Cloud shell commands are listed below. 1)    List the active account name gcloud auth list 2)    List the project ID gcloud config list project 3)    Create a new instance using Gcloud shell gcloud compute instances create [INSTANCE_NAME] --machine-type n1-standard-2 --zone [ZONE_NAME] Use gcloud compute machine-types list to view a list of machine types available in particular zone. If the additional parameters, such as a zone is not specified, Google Cloud will use the information from your default project. To view the default project information, use gcloud compute project-info describe 4)    SSH in to the machine gcloud compute ssh [INSTANCE_NAME] --zone [YOUR_ZONE] 5)    RDP a windows server gcloud compute instances get-serial-port-output [INSTANCE_NAME] --zone [ZONE_NAME] 6)    Command to check whether the server is ready f

Serverless Computing in Google Cloud.

Google Cloud Platform offers two server-less computing options and they are App Engine and Cloud Functions. App Engine is used for applications and containers that run for extended periods of time, such as a website back-end or a custom application for some specific functions/requirements. Cloud Functions is a platform for running code in response to an event, such as uploading a file or adding a message to a message queue. This server-less option works well when you need to respond to an event by running a short process coded in a function or by calling a longer-running application that might be running on a Virtual Machine, managed cluster, or App Engine. And what is a Managed Cluster? A cluster consists of at least one cluster master machine and multiple worker machines called nodes. Nodes are Compute Engine virtual machine (VM) instances that run the Kubernetes processes necessary to make them part of the cluster.

Cisco Firepower Threat Defense NGFW made it to the Best New Firewall Books 2019

Cisco Firepower Threat Defense NGFW made it to the Best New Firewall Books 2019 I'm happy to announce that my book, " Cisco Firepower Threat Defense(FTD) NGFW: An Administrator's Handbook : A 100% practical guide on configuring and managing CiscoFTD using Cisco FMC and FDM .", made it to BookAuthority's Best New Firewall Books : https://bookauthority.org/books/new-firewall-books?t=bku9fw&s=award&book=1726830187 BookAuthority collects and ranks the best books in the world, and it is a great honor to get this kind of recognition. Thank you for all your support! The book is available for purchase on Amazon .

An Overview on Cisco Viptela SD-WAN

Cisco SDWAN Viptela solution comprises of the following components: vManage Network Management System (NMS) Image source https://sdwan-docs.cisco.com   The vManage NMS is a centralized network management system that lets you configure and manage the entire overlay network from a simple graphical dashboard. vManage provides a single pane of glass for configuration and monitoring the SDWAN network. If vManage is offline, traffic forwarding continues on the SDWAN fabric due to separation of control and data plane in the SDWAN fabric. vSmart Controller The vSmart controller is the centralized brain of the SDWAN solution, controlling the flow of data traffic throughout the network. The vSmart controller works with the vBond orchestrator to authenticate SDWAN devices as they join the network and to orchestrate connectivity among the SDWAN routers.The vSmart controllers are the central orchestrators of the control plane. They have permanent communication channels with all the SDWAN