Bitbucket Pipelines is an integrated CI/CD service built into Bitbucket. It allows you to automatically build, test, and even deploy your code based on a configuration file in your repository. Essentially, we create containers in the cloud for you. Inside these containers, you can run commands (like you might on a local machine) but with all the advantages of a fresh system, customized and configured for your needs.
A pipeline is defined using a YAML file called bitbucket-pipelines.yml, which is located at the root of your repository.
Install from here: http://httpd.apache.org/docs/current/install.html
Copy the dist/ folder in /var/www/ folder.
<VirtualHost *:80>ServerAdmin email@example.comServerName myangularapp.comServerAlias www.myangularapp.comDocumentRoot /var/www/dist<Directory “/var/www/dist”>AllowOverride AllRequire all granted</Directory></VirtualHost>
Hit the domain http://myangularapp.com in your browser.
Define the Prometheus service in the unit file:
Description=Prometheus Time Series Collection and Processing Server
This tutorial gives a step by step guide on deploying a django project inside a docker container. We’ll deploy with a virtual environment however, it is best practice to use virtual environments if you’re a python developer because maintaining python packages in one environment is not that easy and there can be huge conflicts.
2. Install Docker: https://docs.docker.com/engine/install/
3. Install Docker-compose: https://docs.docker.com/compose/install/
mkdir project_docker && cd project_docker
For Linux/Mac -
For Windows -
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
Before you get started, you must login to your Google Cloud Platform and set up the following items in Google Cloud.
Creating and managing PostgreSQL databases
Do not include sensitive or personally identifiable information in your instance name; it…
Run the following commands-
sudo docker pull elasticsearch:7.7.1
sudo docker pull logstash:7.7.1
sudo docker pull kibana:7.7.1
Create a user defined network (useful for connecting to other services attached to the same network (e.g. Kibana, Logstash)).
sudo docker network create elknetwork
sudo docker run -dit — name elasticsearch — net elknetwork -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” elasticsearch:7.7.1
Remember to give the same name given in the command(‘ — name elasticsearch’) to your container.
Now, go to the browser and search http://locallhost:9200. You should see output like this-
“Once upon a time” the common phrase used at the beginning of every story. But what actually is the story of time? We say time is money, we waste time and we kill time. But do we really know what time is?
Our whole world is governed by the time. We know that time is everywhere. We know time is universal and eternal. We know it is unidirectional, flows in one direction towards the future. But how can we be so sure about time? The discoveries from the last century showed us that what we know about time may not…
Create Virtualenv with Python3 in Linux, Ubuntu or MAC
virtualenv env -p python3
Create Virtualenv with Python3 in Windows:
python -m venv env
Activate Virtualenv in Linux, Ubuntu or MAC:
Activate Virtualenv in Windows:
Install selenium module with pip command:
pip3 install selenium
Update requirements.txt file:
pip3 freeze > requirements.txt
To download geckodriver for Windows,Linux and Mac:
Extract the zip/tar file and put it in the root repository where your .py script exists.
Create a python script:
from selenium import webdriver
driver = webdriver.Firefox(executable_path=’./geckodriver’)
from selenium import…
GitLab offers a continuous integration service. For each commit or push to trigger your CI pipeline, you must:
# Linux x86–64
sudo curl -L — output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
# Linux x86
sudo curl -L — output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-386
# Linux arm
sudo curl -L — output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-arm
# Linux arm64
sudo curl -L — output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3
2. Give it permissions to execute:
sudo chmod +x /usr/local/bin/gitlab-runner
3. Create a GitLab CI…