Creating VM on Azure Cloud using CLI, Creating a User and Running Task in Background

In this blog, I am going to show the process of installation of Azure CLI tool and then using this tool to create a ubuntu virtual machine and then accessing this virtual machine through ssh and then add one user and then adding their private key and running one job in their environment.

The first thing you need is the tools that are required. The first tool you required is Azure CLI . You can install Azure CLI simple using the following command:

sudo apt install azure-cli

To use the Azure CLI tool you need first to login into your account through terminal. For this purpose use following command:

az login

When you enter this you will be redirected to the browser, there you can enter your login detail. When you entered then you will get this type of message on your terminal.

You have logged in. Now let us find all the subscriptions to which you have access...
The following tenants require Multi-Factor Authentication (MFA). Use 'az login --tenant TENANT_ID' to explicitly login to a tenant.
b76df79f-0110-465c-90f3-07df4642315d
[
  {
    "cloudName": "AzureCloud",
    "homeTenantId": "4ea778976d-32bd-7f5f-aaa5-084cb61a0b0f",
    "id": "37623de4-e2df-4d06-8754-bd88314b4bd0",
    "isDefault": true,
    "managedByTenants": [],
    "name": "Azure for Students",
    "state": "Enabled",
    "tenantId": "5ea9899d-30bd-4f6f-aaa5-084cb61a0b0f",
    "user": {
      "name": "halcyoona@gmail.com",
      "type": "user"
    }
  }
]

Now you are logged in and you can use the Azure CLI tool to create resources from CLI.

az group create --name halcyoona-group --location eastus

When you execute above command you get following output:

{
  "id": "/subscriptions/95623de4-e1df-4c06-9954-bd66314b4bd0/resourceGroups/halcyoona-group",
  "location": "eastus",
  "managedBy": null,
  "name": "halcyoona-group",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": null,
  "type": "Microsoft.Resources/resourceGroups"
}

In Azure, all resources are allocated in a resource management group. Resource groups provide logical groupings of resources that make them easier to work with as a collection.
You have to set the name of the resource and then location. Now the resource group is set then move to next creating a virtual machine with this resource.

From now We look forward to creating a virtual machine using the Azure CLI. Use following command to create virtual machine.

az vm create --resource-group halcyoona-group --name halcyoonaVM --image UbuntuLTS --generate-ssh-keys --output json --verbose

In this you have to set the name of the virtual machine. Second Image you want in your machine. Generate ssh key to access it without password using your private key and if you do not specify key name, it will create a key in ~/.ssh/id_rsa.pub by default. Output will be in json form.

Read More »

Creating VM on Azure

In this blog, I am going to discuss how to create a Virtual machine on the Azure platform. A thing that is required as a prior condition is your account on the Azure platform.

When you log in to your account you have this kind of home page.

Just click on the create resource button then you will find all the resource that you can create but we are just creating virtual machine so just focusing on our goal.

Look, you can create a window virtual machine and Ubuntu but I am creating Ubuntu (If you want to create windows virtual, steps are the same). So, just click on the Ubuntu server then the following screen will be shown:

Select your resource group and name your virtual machine just like I named my virtual machine halcyoonaVM. Select your region in which you want to create your virtual machine (it’s good if you create a virtual machine to your closet region ). Then select your Image. After scrolling some more option will be shown on screen:

If you click on the change size then the following screen will be shown:

Select your machine according to your requirement and you will get back to our previous screen.
Create your SSH key pair and add your public key here. Then you will access your virtual machine using ssh (If you don’t know about SSH click here).

Now select the ports you want to make them open and click on the next disks. This screen will be shown:

Read More »

Journey to become a Microsoft Student Partner Beta member

In this blog, I will discuss my journey towards the Microsoft Student Partner program, But first I will discuss what Microsoft program is.

Microsoft Student Partners is a worldwide recognizable program to sponsor students majoring in disciplines related to technology. The MSP program enhances students’ employability by offering training in skills not usually taught in academia, including knowledge of Microsoft technologies.

The program is available in most countries, and all students in college and university level are eligible to apply. If accepted, Student Partners are assumed to further share the knowledge among the academic community by, for example, arranging courses, giving presentations and initiating projects.

First time when I came across to know what Microsoft Student Program is the year 2019 when Mr. Hanzala Maqsood(MSP Gold) arranged Inspiron session at my university(FAST NUCES, Peshawar). Then I become motivated and thinking for applying for MSP because MSP gives a lot of benefits to students as I am working on robotics so I need some platform to practice machine learning algorithms. in this regard, Azure suits me the best. Azure has a different platform and you will get hand-on sessions on these platforms. Although, MSP program gives a great mentorship to their MSPs and MSP get good experience as working with Microsoft team. But I don’t know how to fill that application then, Mr. Ali Muzahir(MSP Beta) comes to the rescue and help me out in filling that application and then I come to know MSP team is too supportive and collaborative.

On 10th Jan 2020, I got an email from Microsoft that I have been selected in the MSP program-2020 as Alpha I. But there is a question that why I am selected in the MSP program. Before applying for MSP, I have all the things needed in the MSP application. I have my digital portfolio on LinkedIn. I am managing my Github from the previous two years (click here to see my Github). I have also done a lot of workshops and presentations on different topics at my university and many more things. Actually, the thing is you have to make yourself ready for the opportunity and when the opportunity comes you grab it without wasting any time.

To achieve the Alpha-II level, I need to complete one learning path so I completed the learning path in two days i.e start working with C#. And then I promoted to Alpha-II. And now I want to become a Beta-level MSP. To achieve this, I need to conduct a workshop on any topic at any place. So, I with Mr. Hanzala Maqsood managed to arrange a workshop at Islamia University Peshawar to motivate the student to apply for the MSP program and become a part of the Microsoft team. And also do participate in the newly formed MSP society at their university. By reporting this event, I am promoted to the beta level.

Screenshot_2020-02-10 Student Partners Account Microsoft Student Partners

Now I am at beta and looking forward to becoming a gold member.

How to run react native app on your android device through adb

In this blog we are dealing with an error in setting up android device when you are going to develop some app on react native and want to check the app on your connected android device.

When I connected my device and I have already install adb if you don’t have this package installed install it using this command:

sudo apt install adb

Then I checked my device is connect or not by running this command:

adb devices

when I start my project with expo start then I am getting this type of error.

Couldn't adb reverse: cannot bind listener: missing port in specification: 'tcp:null'

first you have to check your firewall is enabled or not. You can check the status of firewall by using this command:

sudo ufw status

And then you can check list of those ports which are listening using this command.

sudo lsof -i -P -n | grep LISTEN

Read More »

Install Andoid Studio on Ubuntu

Introduction

To be successful, Android developers need a good grasp of the Java Language(or Kotlin), Andoid API’s, and Android application architecture. It’s also important to use an appropriate and effective development environment. For many years, Eclipse IDE with the ADT plugin was the preferred platform for Android development. Today, it’s Andoid Studio.

Android Studio is Google’s officially supported IDE for developing Android apps. This IDE is based on Intellij IDEA, which offers a powerful code editor and developer tools.

Installation

Setting up Android Studio takes just a few commands.

First command is to install Java through this command, if you already installed Java skip this step:

sudo add-apt-repository ppa:webupd8team/java

And then update command:

sudo apt update

And then installation command:

sudo apt-get install oracle-java8-installer

When installation start, the following dialog box popup on your screen for the configuration of Java:

jdk1.png

Read More »

Module Development In Odoo

In this blog, I will tell you about how to develop your own module in Odoo.

Creating Directory:

Create a directory to place your newly developed application using the following command :

 mkdir myaddons

Add this directory to your odoo configuration file (odoo.conf) so that the odoo server can detect all the applications within this directory.

sudo subl /etc/odoo/odoo.conf

Edit the addons_path variable by adding the full path of the new directory preceded by a comma ( , ) as shown below:

addons_path = /usr/lib/python3/dist-packages/odoo/addons

Configuration:

The odoo.conf file would look like this:

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /usr/lib/python3/dist-packages/odoo/addons,/home/halcyoona/myaddons

Create the skeleton for your new Application using the command below ! I am calling this application: myconferences.

odoo scaffold myconferences

Read More »

Odoo Installation

Hello everyone,Below you will find the easiest installation guide of odoo 11.Let’s start.

odoo.jpeg

First you run these two command:

sudo apt update
sudo apt upgrade

Python dependencies:

Then install python3-pip using following command:

sudo apt-get install python3-pip

Then install the python  dependencies for Odoo 11 using pip3:

pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen psycopg2 pydot pyparsing PyPDF2 pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject Werkzeug XlsxWriter xlwt xlrd

Read More »

WordPress Installation

In this blog, I will show you how to develop WordPress on your localhost and start working with WordPress.

Basic tool Installation

First you have to install MySQL, Apache and PHP. The following command install the apache2, MySQL-Server  and  PHP in your system.

sudo apt-get install apache2 mysql-server php libapache2-mod-php

Then you need to check packages are working as your desire.

For apache2, run the following commands to ensure that mod_rewrite is enabled:

sudo a2enmod status

If it isn’t already enabled, enable a2enmod and restart Apache:

sudo a2enmod rewrite
sudo systemctl restart apache2

DataBase Creation

Log in to the MySQL command line as the root user:

sudo mysql -u root

Create wordpress database:

CREATE DATABASE wordpress;

Read More »

IA-32 Floating Point Unit

Introduction:

The Floating-Point Unit (FPU) provides high-performance floating-point processing capabilities for use in graphics processing, scientific, engineering, and business applications.

The FPU represents a separate execution environment within the IA-32 architecture. This execution environment consists of 8 data registers and following special purpose registers.

  • The status register
  • The counter register
  • The tag word register

Mechanism:

The FPU data register consists of eight 80-bits registers. Values are stored in these register in the double extended-precision floating point format. When floating-point, integer, or packed BCD integer values are loaded from memory into any of the FPU data registers, the values are automatically converted into the double extended-precision floating-point format (if they are not already in that format). When computation results are subsequently transferred back into memory from any of the FPU registers, the results can be left in the double extended-precision floating-point format or converted back into a shorter floating-point format, an integer format, or the packed BCD integer format.

The FPU instructions treat the eight FPU data register as a register stack.All addressing of the data registers is relative to the register on the top of the stack.

floatingstack.gif

The register number of the current top-of-stack register is stored in the TOP (stack TOP) field in the FPU status word. Load operations decrement TOP by one and load a value into the new top-of-stack register, and store operations store the value from the current TOP register in memory and then increment TOP by one. (For the FPU, a load operation is equivalent to a push and a store operation is equivalent to a pop.) Note that load and store operations are also available that do not push and pop the stack.

Read More »

PESTEL Analysis of Coca-Cola

PESTEL analysis of Coca-Cola is my assignment in my course mg-223(fundamental of management). After reading this blog you will be able to understand how multi-national companies grow and extend their business to different countries. In this blog, I am talking about the PESTEL analysis of Coca-Cola company.

The non-alcoholic beverages brand Coca-Cola operates in the global environment. The global environment subjects a corporation to several pressures. Today, the world market has grown highly globalized. Companies are doing business across large regions spanning several countries. In this highly globalized market, certain factors are of special significance that affects the businesses. Culture, politics, economic situation and even laws are some factors that affect businesses directly and indirectly. Coca-Cola also feels the pinch from time to time. Any change in the global business environment can impact its profits and revenues directly.

cocacola.jpeg

Coca-Cola despite being the leading brand in the beverages industry, is not immune to the various political, social or economic fluctuations. Political or economic changes can negatively impact its profits. There are laws and regulations which vary from country to country and affect it directly. Simultaneously, Cultural factors are of significance. The business of Coca-Cola is spread over more than 200 countries. Social and cultural factors acquire a special importance in that case. A PEST analysis of Coca-Cola will determine all these factors which can impact its business in the global environment.

Political:

The most important political factors which can have a direct impact on Coca-Cola are laws and government regulation of food products. For example in the US, the Food and Drug regulations apply to its business. Apart from it, these laws may vary from country to country. Coca-Cola and its products must conform to the relevant laws in the countries they are sold. (Coca-Cola is a maker of non-alcoholic beverages) However, apart from the food and beverages related regulations and the quality standards, the business is also subject to the common accounting or business regulations. Tax laws vary from country to country. The company has to follow the relevant laws in order to do business in a particular market. Changes to these laws can potentially impact Coca Cola’s profits and revenue. Any increase or decrease in tax rates can affect the profits of any corporation. Similarly, changes in the political situation of the countries like government changes or any political turmoil can potentially impact its business.

Read More »