Get started with Pipelines

Understand the YAML file

Steps to create BitBucket Pipelines

  1. In your BitBucket repository go to Pipelines > click Create your first pipeline.

Install Apache2:

Create Apache configuration file for angular app:

  • vim /etc/apache/sites-available/angular.conf
<VirtualHost *:80>ServerAdmin support@example.comServerName myangularapp.comServerAlias www.myangularapp.comDocumentRoot /var/www/dist<Directory “/var/www/dist”>AllowOverride AllRequire all granted</Directory></VirtualHost>

Enable angular.conf file using the following command:

  • a2ensite angular.conf

Restart the apache service:

  • sudo systemctl restart apache2


Create a user, group, and directories for Prometheus:

  • sudo useradd -M -r -s /bin/false prometheus
  • sudo mkdir /etc/prometheus /var/lib/prometheus

Download and extract the pre-compiled binaries:

Move the files from the downloaded archive to the appropriate locations and set ownership:

  • sudo cp prometheus-2.16.0.linux-amd64/{prometheus,promtool} /usr/local/bin/
  • sudo chown prometheus:prometheus /usr/local/bin/{prometheus,promtool}
  • sudo cp -r prometheus-2.16.0.linux-amd64/{consoles,console_libraries} /etc/prometheus/
  • sudo cp prometheus-2.16.0.linux-amd64/prometheus.yml /etc/prometheus/prometheus.yml
  • sudo chown -R prometheus:prometheus /etc/prometheus
  • sudo chown prometheus:prometheus /var/lib/prometheus

Briefly test your setup by running Prometheus in the foreground:

  • prometheus — config.file=/etc/prometheus/prometheus.yml

Create a systemd unit file for Prometheus:

  • sudo vi /etc/systemd/system/prometheus.service

Pre-requisites:

  1. Django project

Step 1: Create an empty project directory:

mkdir project_docker && cd project_docker

Step 2: Create python environment:

virtualenv env

Step 3: Activate an environment:

source env/bin/activate
.\bin\Scripts\activate

Step 4: Create a Dockerfile in your project directory:

FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y apt-utils vim curl apache2 apache2-utils
RUN apt-get -y install python3 libapache2-mod-wsgi-py3
RUN ln /usr/bin/python3 /usr/bin/python
RUN…



  1. In the Cloud Console, on the project selector page, select or create a Cloud project.
  2. Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.
  1. Go to the Cloud SQL Instances page in the Google Cloud Console.
  2. Click Create instance.
  3. Select PostgreSQL and click Next.
  4. Enter a name.

Prerequisite:

  1. Install Docker: https://docs.docker.com/engine/install/.
  2. 4GB or more RAM(otherwise your system may work slow).

Download official Docker images of ElasticSearch, Logstash and Kibana:

Create Docker network:

Run Elasticsearch:



Download geckodriver:

Facebook:-

Gmail:-


  • Add a .gitlab-ci.yml file to your repository’s root directory.
  • Ensure your project is configured to use a Runner.

Install and Configure a Runner:

  1. Simply download one of the binaries for your system:

Parth Vijay

DevOps | Python Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store