‘Django – python web framework’ session taken by me in Python Pune Meetup Feb 2017

Hi Readers,

On 26th Feb, I took a session on ‘django – python web framework’ in Python Pune Meetup at Tixdo Pvt. Ltd. Cybercity, magarpatta Pune.

I gave a demo as well, but now, I am pasting content of my slides.

slide 1 – django

Web framework written in python
MTV – Model(data access), Template(presentation), View(bridge between M and T / logic)
Request response
Fast, secure, scalable, opensource.

 

slide 2 – architecture

django_mvc_mvt_pattern-jpg

 

slide 3-

The developer writes/provides the model and then template and view maps to the url

slide 4 –

Django comes with a lightweight web server for developing and testing applications. This server is pre-configured to work with Django.

slide 5-  Installation

Prerequisites – python
dnf install python-django
git clone git://github.com/django/django.git , pip install -e django/
Install pip/pip3 and then pip/pip3 install django
using virtualenv

 

slide 6 – Imp files in django after creation of project/app

manage.py
settings.py
urls.py
views.py
wsgi.py

 

slide 7 –  important links

http://djangobook.com/https://www.djangoproject.com/https://developer.fedoraproject.org/https://www.tutorialspoint.com/django/

 

 

Popular database now a days – REDIS

Hi readers,

 

Now a days redies database is very famous.

Because it is in memory database. in memory databases are the databases who used main memory to store the data they dont have storage management system/engine like mysql.

Redis is nosql database, you can store your data in hash/key-value pair format.

It is very fasr so many big companies like twitter instagram, github, stackoverflow are using redis.

We have opensource redis and enterprise redis (redis labs).

 

I will keep posting more information about redis in coming blogs.

What is Kubernetes

Hi readers,

I already published blog about Docker and difference between docker and virtual machine.

Imagine you want to deploy docker on many servers and manage those servers by automation. Kubernetes is the solution for that.

What is Kubernetes-

Kubernetes is basically tool or system which manages deployment, scaling, performing operations of containers like docker automatically over the cluster.

Cluster is basically group of servers.

With Kubernetes, you are able to quickly and efficiently respond to customer demand:

best practices to work around kubernetes go through http://containertutorials.com/get_started_kubernetes/index.html

you want to understand components of kubernetes go through https://kubernetes.io/docs/admin/cluster-components/

Docker vs Virtual Machine

Hi readers,

I have already published 1 blog regarding docker.

Today I am going to tell you difference between Docker and Viertual Machine(VM)

The main difference between docker and vm is their architecture.

In vm hypervisor plays very important role.

On top of hardware level it have hypervisor.

Hypervisor distributes the guest os and however os are there we can have that much applications. With each different os we have different kernels.

But in case of docker-

Lxc plays very imp role.

Lxc is basically linux container, is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. (in vm concepts we should have different kernel for different os, this is main imp difference)

 

Lxc is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.

The Linux kernel provides the cgroups functionality that allows limitation and prioritization of resources (CPU, memory, block I/O, network, etc.) without the need for starting any virtual machines, and also namespace isolation functionality that allows complete isolation of an applications’ view of the operating environment, including process trees, networking, user IDs and mounted file systems.[3]

LXC combines the kernel’s cgroups and support for isolated namespaces to provide an isolated environment for applications. Docker can also use LXC as one of its execution drivers, enabling image management and providing deployment services.

 

 

Useful networking linux commands

Hi readers,

I have talking about cloud, OpenStack for this block readers.

To earn more knowledge about cloud and OpenStack you have to have good knowledge of networking.

Following are the basic networking commands for the linux which you must aware about.

 

ifconfig –

fconfig (interface configurator) command is use to initialize an interface, assign IP Address to interface and enable or disable interface on demand. With this command you can view IP Address and Hardware / MAC address assign to interface and also MTU (Maximum transmission unit) size.

 

ifconfig interface –

e.g.  ifconfig eth0 –

fconfig with interface (eth0) command only shows specific interface details like IP Address, MAC Address etc. with -a options will display all available interface details if it is disable also.

 

ping ip address/url –

e.g. ping google.com or ping x.x.x.x –

PING (Packet INternet Groper) command is the best way to test connectivity between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network (WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other devices

 

traceroute-

e.g. traceroute ip address

traceroute is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path. Below we are tracing route to global DNS server IP Address and able to reach destination also shows path of that packet is traveling.

 

netstat-

e.g. netstat -tnlp

It is very imp command to check your desired port listing desire services.

Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

 

dig-

e.g.- dig http://www.google.com

Dig (domain information groper) query DNS related information like A Record, CNAME, MX Record etc. This command mainly use to troubleshoot DNS related query.

 

route-

e.g-

route

route command also shows and manipulate ip routing table. To see default routing table in Linux, type the following command.