You are on page 1of 7

Experiment No.

07

AIM:- To study and implement database as a service.

THEORY:-

To install Apache, install the latest meta-package apache2 by running :


sudo apt update
sudo apt install apache2
After letting the command run, all required packages are installed and we can test it out by typing
inour IP address for the web server.

Database-as-a-Service (DBaaS) more commonly known as “Managed Databases”, took off when
AWS introduced its Relational Database Service (RDS) in 2009. Since then it has become the fastest
growing cloud service with some estimates projecting a market of $320 billion by 2025. The
reasonfor this meteoric growth is the proven value of Database-as-a-Service in enabling a fast time-
to marketby improving productivity, standardization and data security.
Database-as-a-Service defined
The term “Database-as-a-Service” (DBaaS) refers to software that enables users to setup, operate
andscale databases using a common set of abstractions (primitives), without having to either
know norcare about the exact implementations of those abstractions for the specific database.
For example, a developer could instantiate a database instance using the same set of API calls or
UI clicks regardless of whether the database was MySQL, Oracle or MongoDB. Similarly, the IT
adminuser could request a backup of the database, or create and resize a database cluster using
the same callregardless of the particular database being used. It’s the platform’s responsibility to
implement backup,cluster resizing or any other abstract operation correctly for each of the
underlying databases that theplatform supports
Setup
Setting up a database involves provisioning a VM on which to run it, installing the database, and
configuring it according to a set of parameters. IT administrators managing the platform can
choose to setup databases for their consumers, or enable a self-service model in which
developers and DevOps create databases either through an enterprise portal, an SDK, or even
using automation tools like Terraform. The self-service model has the advantage of zero IT
intervention, freeing up IT admins for more important tasks. Using DBaaS, the time required to
setup a database can be reducedfrom weeks to minutes.
Operate
Once a database has been setup, the platform is responsible for all the back end operations to
maintainit in good health. These include configuration management, automating backups (and
enabling easyrestore when needed), patches and upgrades, DR, service monitoring (both for the
database and the underlying infrastructure) and more. All of these capabilities are provided to
the IT administrator aseasy single-click operations rather than the complex procedures they
would have been without a DBaaS platform.
Scale
To accommodate increased usage of an application as it evolves and matures, the platform
shouldautomatically scale up database instances as needed according to a set of policies. For
example, asusage grows beyond a certain threshold, data from a master instance can be
automatically distributedto one or more read replica instances. Once data has been distributed
over multiple instances, one ofthe read replicas can also be used for failover.
DBaaS on IaaS
DBaaS is often delivered as a component of a more comprehensive platform, which may
provideadditional services such as Infrastructure-as-a-Service (IaaS). The DBaaS solution
would requestresources from the underlying IaaS, which would automatically manage the
provisioning compute,storage and networking as needed essentially removing the need for IT
to be involved.
The service is suitable for:
IT shops offering cloud-based services
End users such as developers, testers, and DevOps personnel

Benefits of DBaaS
DBaaS technology saves valuable resources on setting up and managing database systems and the
ITenvironment. The technology reduces the time spent on the procedure from weeks and days
to a matter of a few minutes. This is especially true for self-service use cases in DevOps
environments thatrequire rapid and cost-effective operations capabilities for their IT systems.
From a business perspective, the DBaaS technology offers these benefits:

High quality of service. Cloud vendors manage database systems as part of a Service Level
Agreement(SLA) guarantee to ensure that the systems are running to optimal performance.
These guarantees also include compliance to stringent security regulations. The service
availability is managed by thecloud vendor to high standards as per the SLA agreement.
Faster deployment. Free your resources from administrative tasks and engage your employees on
tasksthat lead directly to innovation and business growth—instead of merely keeping the systems
running.Resource elasticity. The technology resources dedicated for database systems can be
changed in response to changing usage requirements. This is especially suitable in business use
cases where the demand for database workloads is dynamic and not entirely predictable.
Rapid provisioning. Self-service capabilities allow users to provision new database instances
as required, often with a few simple clicks. This removes the governance hurdles and
administrativeresponsibilities from IT.
Business agility. Organizations can take advantage of rapid provisioning and deployment to
address changing business requirements. In DevOps organizations, this is particularly useful as
Devs and Opsboth take on collective responsibilities of operations tasks.
Security. The technologies support encryption and multiple layers of security to protect sensitive
dataat rest, in transit and during processing.

Disadvantages of Using DbaaS:

Security and Data Privacy: Although security is one of the key advantages when availing services to
DBaaS. However it accompanies concerns with regards to data privacy. It can be securely safe when it
comes to the computing appliance and/or software you are interfacing to utilize your database
instance,but you might never know how your data is being handled or managed as you do not have
control or access to limit only people who can gain access.

Physical Control: Technology amazes us day-to-day as there are brand new reports or technology
thatarises daily. With regards to this, whenever there are security and enhancements products
that you wanted to push through and wanted to implement how your data is stored, accessed,
or managed; there's no way you can implement it. Definitely, it's a self-managed service. All you
can do is pass a support ticket and ask for a feature or a question if this specific hardware or
security enhancements ispart of the roadmap for security upgrade. In most cases, your wishlist
will not be granted.

Domain of Responsibility: In times of trouble, part of the SLA's indicates that it is fully-managed and
that security is dealt with regarding network with security intrusion and breach detection. That
somehow can be an overstatement found in their page that this is observed and implemented
underindustry standards. Although following industry standards in compliance to ISOs as what
cloud
providers are doing now, there's still a concern with responsibility as how are the data being
managed, or accessed, and especially if the engineers have understood the compliance they're
dealing with.

Vendor Lock-In: There comes a time when the provider decides to longer remove that feature but
you find that feature non-existent to other DBaaS providers just because the latter also is moving
away to support the specific feature or might move away slowly from DBaaS due to financial or
governance reasons within their company or organization.

Apache : The Apache HTTP Server is a free and open-source cross-platform web server
software, released under the terms of Apache License 2.0. Apache is developed and
maintained by an open community of developers under the auspices of the Apache Software
Foundation.
Apache is a popular open-source, cross-platform web server that is, by the numbers, the most
popularweb server in existence. It’s actively maintained by the Apache Software Foundation.
Some high-profile companies using Apache include Cisco, IBM, Salesforce, General Electric, Adobe,
VMware, Xerox, LinkedIn, Facebook, Hewlett-Packard, AT&T, Siemens, eBay, and many more.
In addition to its popularity, it’s also one of the oldest web servers, with its first release all the
way back in 1995. Many cPanel hosts utilize Apache today. Like other web servers, Apache
powers thebehind-the-scenes aspects of serving your website’s files to visitors.
Because Apache doesn’t perform as well in some benchmarks, especially for static websites or
websites with high traffic.

How to Install Apache on Ubuntu


Before installing new software, it’s a good idea to refresh your local software package
database to make sure you are accessing the latest versions. This helps cut down on the time it
takes to update after installation, and it also helps prevent zero-day exploits against outdated
software.
Open a terminal and type:

sudo apt-get update

Let the package manager finish


updating.Step 1: Install Apache
To install the Apache package on Ubuntu, use the command:

sudo apt-get install apache2

The system prompts for confirmation – do so, and allow the system to complete the installation.
Step 2: Verify Apache Installation
To verify Apache was installed correctly, open a web browser and type in the address bar:

http://local.server.ip

The web browser should open a page labeled “Apache2 Ubuntu Default Page,” as in the image
below:Step 3: Configure Your Firewall
Although the Apache installation process is complete, there is one more additional step. Configure the
default UFW firewall to allow traffic on port 80.
Start by displaying available app profiles on UFW:

sudo ufw show app list

The terminal should respond by listing all available application profiles, as seen in the example below.

Available applications:
Apache
Apache Full
Apache Secure
OpenSSH

Use the following command to allow normal web traffic on port 80:

sudo ufw allow 'Apache'


Verify the changes by checking UFW status:

sudo ufw status

If you have other applications or services to allow, make sure you configure your firewall to
allow traffic. For example, using the sudo ufw allow 'OpenSSH' command will enable secure,
encryptedlogins over the network.
Apache Configuration
Apache Service
Controls
When managing a web server, it’s helpful to have some level of control over the service. You’ll
probably find yourself reloading or restarting Apache quite frequently, as you make configuration
changes and test them. However, it’s also helpful to be able to stop (and start) the Apache service
asneeded.
This operation uses the systemctl command, with a series of switches:
Stop Apache:

sudo systemctl stop apache2.service

Start Apache:

sudo systemctl start apache2.service

Restart Apache:

sudo systemctl restart apache2.service


Reload Apache:

sudo systemctl reload apache2.service

Apache Configuration Files, Directories and Modules


Now that you have Apache installed, there are a couple of other things you will need to be aware
of tomake content available online. Most of all, this means dealing with directories and
configuration files.
Directories
After installing, Apache by default creates a document root directory at /var/www/html.
Any files that you place into this directory are available to Apache to distribute over the network.
Which means, this is the place where you copy web page files you want to publish. This is also
whereyou would want to install content management systems, such as WordPress.
Configuration Files
As mentioned above, website content is stored in the/var/www/html/directory. You can create
subdirectories within this location for each different website hosted on your server.
Apache creates log files for any errors it generates in the file /var/log/apache2/error.log.
It also creates access logs for its interactions with clients in the file /var/log/apache2/access.log.
Like many Linux-based applications, Apache functions through the use of configuration files. They
are all located in the /etc/apache2/ directory.

CONCLUSION:-
We have successfully implemented database as a service.

You might also like