Skip to content

Commit 2cffc9e

Browse files
committed
Merge branch 'develop' into feature/new-docs-ui
2 parents fbc026e + 326f455 commit 2cffc9e

File tree

763 files changed

+5746
-198
lines changed
  • ci/vale
  • docs
    • applications
      • big-data/apache-airflow-tutorial-creating-connections-and-variables
      • cloud-storage
      • configuration-management
        • ansible/ansible-adhoc-commands
        • chef
          • install-a-chef-server-workstation-on-ubuntu-14-04
          • install-a-chef-server-workstation-on-ubuntu-18-04
        • puppet
          • install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-16-04
          • install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-18-04
          • use-puppet-modules-to-create-a-lamp-stack
          • use-puppet-modules-to-create-a-lamp-stack-ubuntu-18-04-master
        • terraform
        • vault/use-hashicorp-vault-for-secret-management
      • media-servers
        • install-plex-media-server-on-centos-7
        • install-plex-media-server-on-ubuntu-18-04
      • messaging
        • install-openfire-on-ubuntu-12-04-for-instant-messaging
        • installing-prosody-xmpp-server-on-debian-5-lenny
        • installing-prosody-xmpp-server-on-ubuntu-10-04-lucid
        • installing-prosody-xmpp-server-on-ubuntu-10-10-maverick
        • installing-prosody-xmpp-server-on-ubuntu-12-04-precise-pangolin
        • installing-prosody-xmpp-server-on-ubuntu-8-04-hardy
        • installing-prosody-xmpp-server-on-ubuntu-9-04-jaunty
        • installing-prosody-xmpp-server-on-ubuntu-9-10-karmic
        • instant-messaging-services-with-ejabberd-on-centos-5
        • instant-messaging-services-with-ejabberd-on-debian-5-lenny
        • instant-messaging-services-with-ejabberd-on-fedora-13
        • instant-messaging-services-with-ejabberd-on-ubuntu-8-04-hardy
        • instant-messaging-services-with-ejabberd-on-ubuntu-9-04-jaunty
        • instant-messaging-services-with-ejabberd-on-ubuntu-9-10-karmic
        • instant-messaging-services-with-openfire-on-centos-5
        • instant-messaging-services-with-openfire-on-debian-5-lenny
        • instant-messaging-services-with-openfire-on-debian-6-squeeze
        • instant-messaging-services-with-openfire-on-ubuntu-10-04-lts-lucid
        • instant-messaging-services-with-openfire-on-ubuntu-9-04-jaunty
        • instant-messaging-services-with-openfire-on-ubuntu-9-10-karmic
        • use-ejabberd-for-instant-messaging-on-ubuntu-12-04
      • project-management
        • manage-projects-with-redmine-on-debian-5-lenny
        • manage-projects-with-redmine-on-debian-6-squeeze
        • manage-projects-with-redmine-on-ubuntu-10-04-lts-lucid
        • manage-projects-with-redmine-on-ubuntu-11-04-natty
        • manage-projects-with-redmine-on-ubuntu-9-10-karmic
        • power-team-collaboration-with-egroupware-on-centos-5
        • power-team-collaboration-with-egroupware-on-debian-5-lenny
        • power-team-collaboration-with-egroupware-on-fedora-13
        • power-team-collaboration-with-egroupware-on-ubuntu-9-10-karmic
      • remote-desktop
        • install-vnc-on-ubuntu-16-04
        • install-vnc-on-ubuntu-18-04
        • run-graphic-software-on-your-linode-with-xforwarding-on-ubuntu-12-04
        • running-graphic-software-xforwarding-debian
        • using-vnc-to-operate-a-desktop-on-ubuntu-12-04
      • social-networking
        • create-an-aggregate-blog-using-planet-on-debian-5-lenny
        • create-an-aggregate-blog-using-planet-on-ubuntu-9-10-karmic
        • create-an-aggregate-blog-using-planet-venus-on-ubuntu-10-04-lucid
        • create-an-aggregate-blog-using-planet-venus-on-ubuntu-12-04-precise-pangolin
      • voip
        • deploy-voip-services-with-asterisk-and-freepbx-on-ubuntu-12-04-precise
        • deploy-voip-services-with-asterisk-and-freepbx-on-ubuntu-9-10-karmic
        • install-asterisk-on-centos-7
    • databases
      • cassandra
        • how-to-install-apache-cassandra-on-centos-8
        • how-to-install-apache-cassandra-on-debian-9
        • how-to-install-apache-cassandra-on-ubuntu-18-04
      • couchdb
        • use-couchdb-for-document-based-data-storage-on-centos-5
        • use-couchdb-for-document-based-data-storage-on-debian-5-lenny
        • use-couchdb-for-document-based-data-storage-on-debian-6-squeeze
        • use-couchdb-for-document-based-data-storage-on-fedora-13
        • use-couchdb-for-document-based-data-storage-on-fedora-14
        • use-couchdb-for-document-based-data-storage-on-ubuntu-10-04-lucid
        • use-couchdb-for-document-based-data-storage-on-ubuntu-10-10-maverick
        • use-couchdb-for-document-based-data-storage-on-ubuntu-12-04
        • use-couchdb-for-document-based-data-storage-on-ubuntu-9-10-karmic
      • elasticsearch
      • mongodb
      • mysql
        • how-to-install-mysql-on-centos-6
        • how-to-install-mysql-on-centos-7
        • how-to-install-mysql-on-debian-7
        • how-to-install-mysql-on-debian-8
        • install-and-configure-phpmyadmin-on-debian-8
        • install-mysql-on-ubuntu-14-04
        • install-mysql-phpmyadmin-debian-7
        • install-mysql-phpmyadmin-on-ubuntu-12-04
        • install-mysql-phpmyadmin-ubuntu-14-04
        • manage-mysql-with-phpmyadmin-on-debian-5-lenny
        • manage-mysql-with-phpmyadmin-on-ubuntu-10-10-maverick
        • manage-mysql-with-phpmyadmin-on-ubuntu-9-10-karmic
        • managing-mysql-with-phpmyadmin-on-centos-6-4
        • use-mysql-relational-databases-on-centos-5
        • use-mysql-relational-databases-on-debian-5-lenny
        • use-mysql-relational-databases-on-debian-6-squeeze
        • use-mysql-relational-databases-on-fedora-12
        • use-mysql-relational-databases-on-fedora-13
        • use-mysql-relational-databases-on-fedora-14
        • use-mysql-relational-databases-on-ubuntu-10-04-lts-lucid
        • use-mysql-relational-databases-on-ubuntu-10-10-maverick
        • use-mysql-relational-databases-on-ubuntu-8-04-hardy
        • use-mysql-relational-databases-on-ubuntu-9-04-jaunty
        • use-mysql-relational-databases-on-ubuntu-9-10-karmic
        • using-mysql-relational-databases-on-arch-linux
        • using-mysql-relational-databases-on-fedora-20
        • using-mysql-relational-databases-on-gentoo
      • oracle
        • oracle-10g-express-edition-on-debian-5-lenny
        • oracle-10g-express-edition-on-debian-6-squeeze
        • oracle-10g-express-edition-on-ubuntu-10-04-lts-lucid
        • oracle-10g-express-edition-on-ubuntu-10-10-maverick
        • oracle-10g-express-edition-on-ubuntu-9-10-karmic
      • postgresql
      • redis
    • development
      • bug-tracking
        • manage-development-with-the-mantis-bug-tracker-on-centos-5
        • manage-development-with-the-mantis-bug-tracker-on-debian-5-lenny
        • manage-development-with-the-mantis-bug-tracker-on-fedora-14
      • ci
        • automate-builds-with-jenkins-on-ubuntu
        • use-buildbot-for-software-testing-on-ubuntu
      • clojure/clojure-deployment-with-immutant-and-wildfly-on-ubuntu-14-04
      • frameworks
        • apache-tomcat
          • apache-tomcat-on-centos-8
          • apache-tomcat-on-debian-10
          • apache-tomcat-on-debian-5-lenny
          • apache-tomcat-on-debian-6-squeeze
          • apache-tomcat-on-fedora-12
          • apache-tomcat-on-fedora-13
          • apache-tomcat-on-fedora-14
          • apache-tomcat-on-ubuntu-10-04-lucid
          • apache-tomcat-on-ubuntu-10-10-maverick
          • apache-tomcat-on-ubuntu-12-04-precise-pangolin
          • apache-tomcat-on-ubuntu-16-04
          • apache-tomcat-on-ubuntu-18-04
          • apache-tomcat-on-ubuntu-9-10-karmic
          • installing-apache-tomcat-on-ubuntu-8-04-lts-hardy
          • installing-apache-tomcat-on-ubuntu-9-04-jaunty
        • asp-net
          • build-aspnetmono-applications-with-modmono-and-apache-on-debian-5-lenny
          • build-aspnetmono-applications-with-modmono-and-apache-on-ubuntu-10-04-lucid
          • build-aspnetmono-applications-with-modmono-and-apache-on-ubuntu-9-10-karmic
        • cakephp/cakephp-on-debian-5-lenny
        • django
          • django-apache-and-modpython-on-centos-5
          • django-apache-and-modpython-on-debian-5-lenny
          • django-apache-and-modpython-on-ubuntu-10-04-lucid
          • django-apache-and-modpython-on-ubuntu-8-04-hardy
          • django-apache-and-modpython-on-ubuntu-9-04-jaunty
          • django-apache-and-modpython-on-ubuntu-9-10-karmic
          • django-apache-and-modwsgi-on-centos-5
          • django-apache-and-modwsgi-on-debian-5-lenny
          • django-apache-and-modwsgi-on-debian-6-squeeze
          • django-apache-and-modwsgi-on-fedora-14
          • django-apache-and-modwsgi-on-ubuntu-10-04-lucid
          • django-apache-and-modwsgi-on-ubuntu-10-10-maverick
          • django-apache-and-modwsgi-on-ubuntu-9-10-karmic
        • seaside/deploy-smalltalk-applications-with-seaside
        • sinatra
          • sinatra-framework-and-nginx-on-debian-5-lenny
          • sinatra-framework-and-nginx-on-debian-6-squeeze
          • sinatra-framework-and-nginx-on-fedora-14
        • symfony
        • webpy
        • yesod/yesod-nginx-mysql-on-debian-7-wheezy
      • java
        • how-to-deploy-spring-boot-applications-nginx-ubuntu-16-04
        • how-to-install-openjdk-on-centos-8
        • how-to-install-openjdk-on-debian-10
        • how-to-install-openjdk-on-ubuntu-18-04
        • how-to-install-openjdk-on-ubuntu-20-04
        • install-java-on-centos
        • install-java-on-debian
        • install-java-on-ubuntu-16-04
        • java-development-wildfly-centos-7
      • javascript/build-react-video-streaming-app
      • nodejs
        • how-to-install-nodejs-and-nginx-on-centos-8
        • how-to-install-nodejs-and-nginx-on-debian
        • how-to-install-nodejs-and-nginx-on-debian-10
        • how-to-install-nodejs-and-nginx-on-ubuntu-18-04
        • install-configure-selenium-grid-ubuntu-16-04
      • python
        • create-a-python-virtualenv-on-centos-8
        • create-a-python-virtualenv-on-debian-10
        • create-a-python-virtualenv-on-ubuntu-1610
        • create-a-python-virtualenv-on-ubuntu-18-04
      • react
        • how-to-deploy-a-react-app-on-centos-8
        • how-to-deploy-a-react-app-on-debian-10
        • how-to-deploy-a-react-app-on-ubuntu-18-04
      • ror
        • ruby-on-rails-apache-debian
        • ruby-on-rails-apache-debian-8
        • ruby-on-rails-nginx-debian
        • ruby-on-rails-with-apache-on-debian-6-squeeze
        • ruby-on-rails-with-apache-on-debian-7-wheezy
        • ruby-on-rails-with-apache-on-ubuntu-10-04-lucid
        • ruby-on-rails-with-apache-on-ubuntu-10-10-maverick
        • ruby-on-rails-with-apache-on-ubuntu-9-04-jaunty
        • ruby-on-rails-with-apache-on-ubuntu-9-10-karmic
        • ruby-on-rails-with-nginx-on-centos-5
        • ruby-on-rails-with-nginx-on-debian-5-lenny
        • ruby-on-rails-with-nginx-on-debian-7-wheezy
        • ruby-on-rails-with-nginx-on-ubuntu-10-04-lucid
        • ruby-on-rails-with-nginx-on-ubuntu-10-10-maverick
        • ruby-on-rails-with-nginx-on-ubuntu-12-04-precise
        • ruby-on-rails-with-nginx-on-ubuntu-8-04-hardy
        • ruby-on-rails-with-nginx-on-ubuntu-9-04-jaunty
        • ruby-on-rails-with-nginx-on-ubuntu-9-10-karmic
        • use-unicorn-and-nginx-on-ubuntu-14-04
        • use-unicorn-and-nginx-on-ubuntu-18-04
      • version-control
    • email
      • citadel
        • email-with-citadel-on-debian-5-lenny
        • email-with-citadel-on-debian-6-squeeze
        • email-with-citadel-on-ubuntu-10-04-lts-lucid
        • email-with-citadel-on-ubuntu-12-04-lts-precise-pangolin
        • email-with-citadel-on-ubuntu-14-04
        • email-with-citadel-on-ubuntu-9-04-jaunty
        • email-with-citadel-on-ubuntu-9-10-karmic
      • clients
        • install-squirrelmail-on-ubuntu-16-04-or-debian-8
        • installing-squirrelmail-on-debian-7
        • installing-squirrelmail-on-ubuntu-12-04
      • exim
        • deploy-exim-as-a-send-only-mail-server-on-ubuntu-12-04
        • sendonly-mail-server-with-exim-on-debian-5-lenny
        • sendonly-mail-server-with-exim-on-debian-6-squeeze
        • sendonly-mail-server-with-exim-on-ubuntu-10-04-lts-lucid
        • sendonly-mail-server-with-exim-on-ubuntu-10-10-maverick
        • sendonly-mail-server-with-exim-on-ubuntu-11-04-natty
        • sendonly-mail-server-with-exim-on-ubuntu-9-10-karmic
      • iredmail/install-iredmail-on-ubuntu
      • mailman
        • manage-email-lists-with-gnu-mailman-on-debian-5-lenny
        • manage-email-lists-with-gnu-mailman-on-debian-6-squeeze
        • manage-email-lists-with-gnu-mailman-on-ubuntu-10-04-lucid
        • manage-email-lists-with-gnu-mailman-on-ubuntu-10-10-maverick
        • manage-email-lists-with-gnu-mailman-on-ubuntu-12-04-precise-pangolin
        • manage-email-lists-with-gnu-mailman-on-ubuntu-9-10-karmic
      • postfix
        • basic-postfix-email-gateway-on-debian-5-lenny
        • basic-postfix-email-gateway-on-debian-6-squeeze
        • basic-postfix-email-gateway-on-ubuntu-10-04-lucid
        • basic-postfix-email-gateway-on-ubuntu-10-10-maverick
        • configure-spf-and-dkim-in-postfix-on-debian-8
        • configure-spf-and-dkim-in-postfix-on-debian-9
        • email-with-postfix-courier-and-mysql-on-debian-5-lenny
        • email-with-postfix-courier-and-mysql-on-fedora-12
        • email-with-postfix-courier-and-mysql-on-fedora-13
        • email-with-postfix-courier-and-mysql-on-ubuntu-8-04-hardy
        • email-with-postfix-courier-and-mysql-on-ubuntu-9-04-jaunty
        • email-with-postfix-courier-and-mysql-on-ubuntu-9-10-karmic
        • email-with-postfix-dovecot-and-mysql
        • email-with-postfix-dovecot-and-mysql-on-centos-5
        • email-with-postfix-dovecot-and-mysql-on-centos-6
        • email-with-postfix-dovecot-and-mysql-on-debian-5-lenny
        • email-with-postfix-dovecot-and-mysql-on-debian-6-squeeze
        • email-with-postfix-dovecot-and-mysql-on-ubuntu-10-04-lts-lucid
        • email-with-postfix-dovecot-and-mysql-on-ubuntu-10-10-maverick
        • email-with-postfix-dovecot-and-mysql-on-ubuntu-9-10-karmic
        • postfix-dovecot-and-system-user-accounts-on-debian-5-lenny
        • postfix-dovecot-and-system-user-accounts-on-debian-6-squeeze
        • postfix-dovecot-and-system-user-accounts-on-ubuntu-10-04-lucid
        • postfix-dovecot-and-system-user-accounts-on-ubuntu-10-10-maverick
      • zimbra
        • email-and-calendars-with-zimbra-6-on-centos-5
        • email-and-calendars-with-zimbra-6-on-debian-5-lenny
        • email-and-calendars-with-zimbra-6-on-debian-6-squeeze
        • email-and-calendars-with-zimbra-6-on-ubuntu-10-04-lts-lucid

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

763 files changed

+5746
-198
lines changed

ci/vale/dictionary.txt

+5
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ boto
124124
bounceback
125125
brackley
126126
bram
127+
brd
127128
browserify
128129
bs4
129130
bufio
@@ -674,6 +675,7 @@ jenkinsfile
674675
jenkinsx
675676
jetpack
676677
jez
678+
jitsi
677679
jk
678680
jks
679681
jobd
@@ -757,6 +759,7 @@ libphp
757759
libpri
758760
libracy
759761
libsasl2
762+
libyang
760763
libuv
761764
lifecycle
762765
lighthttpd
@@ -880,6 +883,7 @@ misconfigured
880883
mitigations
881884
mkdir
882885
mnesia
886+
mngtmpaddr
883887
moby
884888
moddable
885889
modsecurity
@@ -1139,6 +1143,7 @@ procs
11391143
productpage
11401144
prosodyctl
11411145
proto
1146+
protobuf
11421147
protocode
11431148
proxied
11441149
proxying
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
---
2+
author:
3+
name: Angel D'az
4+
email: angel@ocelotdata.com
5+
description: 'This Apache Airflow tutorial introduces you to Airflow Variables and Connections. You also learn how to use the Airflow CLI to quickly create variables that you can encrypt and source control. Similarly, the tutorial provides a basic example for creating Connections using a Bash script and the Airflow CLI. These two examples can be incorporated into your Airflow data pipelines using Python.'
6+
og_description: 'This Apache Airflow tutorial introduces you to Airflow Variables and Connections. You also learn how to use the Airflow CLI to quickly create variables that you can encrypt and source control. Similarly, the tutorial provides a basic example for creating Connections using a Bash script and the Airflow CLI. These two examples can be incorporated into your Airflow data pipelines using Python.'
7+
keywords: ['apache airflow tutorial', 'apache airflow features']
8+
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
9+
published: 2020-03-30
10+
modified_by:
11+
name: Angel D'az
12+
title: "An Apache Airflow Tutorial: How to Create Connections and Variables"
13+
h1_title: "An Apache Airflow Tutorial: Creating Connections and Variables"
14+
image: feature.png
15+
contributor:
16+
name: Angel D'az
17+
link: https://github.com/angelddaz/
18+
external_resources:
19+
- '[Apache Airflow Official Documentation](https://airflow.apache.org/docs/stable/)'
20+
---
21+
22+
## What is Apache Airflow?
23+
[Airflow](https://airflow.apache.org/) is an open source platform that you can use to automate, orchestrate, and monitor workflows and data pipelines. One of Airflow’s greatest features is that you can create and execute workflows with code. When you use workflows that are powered by code, you can version control, collaborate on, and debug your workflows.
24+
25+
Airflow refers to workflows as *Directed Acyclic Graphs (DAGs)*. A DAG includes the sequence of tasks to execute along with the relationship between tasks and their dependencies. You can execute an [ETL process](https://en.wikipedia.org/wiki/Extract,_transform,_load) (extract, load, and transform data) with Airflow and also automate emails with CSV attachments, and create Machine Learning (ML) workflows.
26+
27+
You can connect your Airflow data sources to a central data *warehouse* so your data analysts have access to all relevant data, which prevents data silos from developing across an organization. Similarly, transparent and reproducible code-driven workflows reduce bottlenecks, because anyone with access to the workflow's code can debug it.
28+
29+
Airflow provides a [Python application programming interface (API)](https://airflow.apache.org/docs/stable/_api/index.html) that you can use to code your DAGs and call any connection scripts you create.
30+
31+
### In this Guide
32+
33+
This tutorial provides an introduction with basic examples to two fundamental Airflow concepts, *Variables* and *Connections*. You can incorporate the ideas covered in this guide into more sophisticated Python scripts when creating your DAGs and data pipelines.
34+
35+
In this Apache Airflow tutorial, you learn how to:
36+
37+
- [store Airflow values in variables](#create-your-dag-variables) using the Airflow command-line interface (CLI)
38+
- [automate connecting to your data sources](#create-your-connection-script) using a simple script and the Airflow CLI
39+
40+
## Airflow Variables and Connections
41+
42+
Airflow needs to access data from external sources, like [databases](https://www.linode.com/blog/one-click-apps/new-web-development-and-database-one-click-apps/), [APIs](https://developers.linode.com/api/v4), and [servers](https://www.linode.com/products/shared/). You use [Airflow *Connections*](https://airflow.apache.org/docs/stable/howto/connection/index.html) to create connections to your data sources. Your connections form the building blocks of your Airflow DAGs, because they define your data's sources, [staging area](https://airflow.apache.org/docs/stable/best-practices.html#staging-environment), and destination.
43+
44+
You use Airflow variables to store reusable values, like URIs, database usernames, configurations, and any other values required by your DAGs. The variables are stored in Airflow's metadata database.
45+
46+
### The Airflow CLI
47+
48+
You can use the Airflow CLI to manage your DAGs and create, edit, and delete Airflow objects like connections and variables. You can incorporate CLI commands into scripts to automate your frequently used Airflow CLI commands. In this guide, you learn how to leverage the Airflow CLI to automate creating your Airflow Variables and Connections.
49+
50+
## Automate Creating Airflow Variables and Connections
51+
52+
### Create Your DAG Variables
53+
54+
Using a JSON file to load [Airflow variables](https://airflow.apache.org/docs/stable/concepts.html#variables) is a more reproducible and faster method than using the Airflow graphical user interface (GUI) to create variables. This section uses a simple example to demonstrate how to create and store Airflow variables using the Airflow CLI.
55+
56+
1. Using a text editor, create a new JSON file to store key-value pairs of any values you need to reuse in your DAGs. The example file includes connection information for a MySQL database.
57+
58+
{{< file "~/example_vars.json">}}
59+
{
60+
"my_prod_db": "dbname",
61+
"my_prod_db_user": "username",
62+
"my_prod_db_pass": "securepassword",
63+
"my_prod_db_uri": "mysql://192.0.2.0:3306/"
64+
}
65+
{{</ file >}}
66+
67+
68+
1. Issue the following command to load all your variables. Replace the path with the location of your `example_vars.json` file.
69+
70+
airflow variables --import /home/username/example_vars.json
71+
72+
1. To retrieve a variable value from Airflow, use the following command:
73+
74+
airflow variables -g my_prod_db
75+
76+
Airflow returns the value of the `my_prod_db` variable.
77+
{{< output >}}
78+
dbname
79+
{{</ output >}}
80+
81+
{{< note >}}
82+
Airflow saves the passwords for connections and any variable values in plain text within the metadata database. See the [A Recommended Workflow for Sensitive Variables](#a-recommended-workflow-for-sensitive-variables) section for ways to keep your variables secure.
83+
{{</ note >}}
84+
85+
### Create Your Connection Script
86+
87+
The Airflow CLI can be used to create your [Connections](https://airflow.apache.org/docs/stable/howto/connection/index.html) to any external system required by you DAGs. This section shows you how to create a simple connection with a reusable bash script that you can adopt for your own Airflow Connections. The example below includes a connection for a MySQL database.
88+
89+
1. Create a new file named `connection.sh`. Replace the values with your own values or expand on the script to create the Connections required by your DAGs.
90+
91+
{{< file "connection.sh">}}
92+
#!/usr/bin/env bash
93+
94+
airflow connections -d --conn_id db_conn
95+
96+
airflow connections -a --conn_id db_conn --conn_type mysql --conn_host 'mysql://192.0.2.0:3306/' --conn_schema 'dbname' --conn_login 'username' --conn_port '3306' --conn_password 'securepassword'
97+
{{</ file >}}
98+
99+
The third line of the script deletes any connections that the script may have created previously to maintain [*idempotency*](https://en.wikipedia.org/wiki/Idempotence). This means your script can be run as many times as desired with the same expected result.
100+
101+
1. Ensure that you can execute your Connections script:
102+
103+
chmod u+x /home/username/connection.sh
104+
105+
1. Load your connections by executing your completed script:
106+
107+
bash /home/username/connection.sh
108+
109+
1. Use the Airflow CLI to verify that your new Connection was created. Replace `db_conn` with the name of your Connection.
110+
111+
airflow connections --list | grep 'db_conn'
112+
113+
## A Recommended Workflow for Sensitive Variables
114+
115+
If you use a JSON file to store sensitive connection variables or if you use a script to automate your Airflow Connections, you should develop a workflow for encrypting and decrypting sensitive values. Airflow saves the passwords for connections in plain text within the metadata database. A workflow for your sensitive connection data ensures that these values are never exposed in a raw string format. The section below includes a sketch for a workflow you can consider to keep your sensitive variables secure.
116+
117+
- **Encrypt**: You can use tools like [Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) to encrypt sensitive values before storing them in a remote repository, like [GitHub](https://github.com/). Another popular tool for storing sensitive values is [HashiCorp Vault](https://www.vaultproject.io/). The Python [Crypto](https://airflow.apache.org/docs/stable/howto/secure-connections.html#securing-connections) package is another tool that you can use to enable encryption for passwords.
118+
119+
- **Decrypt**: In order to run any automation scripts containing your encrypted variable values, you must include a decryption step before executing them. Airflow needs the decrypted values in order to run your DAGs. Both Ansible Vault and HaschiCorp Vault include mechanisms for providing decrypted variable values to Airflow.
120+
121+
- **Load**: Once your values are decrypted, execute your scripts.
122+
123+
- **Encrypt**: After your automated infrastructure loads both Airflow Variables and Connections, encrypt your sensitive values. This way sensitive data is only exposed through an encrypted Airflow Database that only Airflow can access.
124+
125+
## Conclusion
126+
127+
Automating creating your Airflow Variables and Connections is a fundamental step towards transparent data for quick experimentation, prototyping, and analysis. Having all of your relevant data connections in a central and secure repository sets up your organization for collaboration. This allows you to spend less time on the extract and load steps of workflows and more time on the transformation step.
128+
129+
After completing this tutorial, learn how to build a data pipeline using Python using Airflow's [example Pipeline tutorial](https://airflow.apache.org/docs/stable/tutorial.html).
130+

docs/applications/cloud-storage/install-and-configure-owncloud-on-ubuntu-16-04/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ title: 'Install and Configure ownCloud on Ubuntu 16.04'
1414
external_resources:
1515
- '[ownCloud Official Documentation](https://doc.owncloud.org/)'
1616
- '[ownCloud Marketplace](https://marketplace.owncloud.com/)'
17+
relations:
18+
platform:
19+
key: how-to-install-owncloud
20+
keywords:
21+
- distribution: Ubuntu 16.04
1722
---
1823

1924

docs/applications/cloud-storage/owncloud-debian-7/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ modified_by:
1111
name: Alex Fornuto
1212
published: 2014-06-10
1313
title: 'Installing and Configuring ownCloud on Debian 7.4'
14+
relations:
15+
platform:
16+
key: how-to-install-owncloud
17+
keywords:
18+
- distribution: Debian 7
1419
---
1520

1621
ownCloud is an open source platform that allows easy access to files from multiple locations and platforms. It's compatible with most major operating systems and mobile devices. With ownCloud you can store files on your Linode and then access them wherever you go.

docs/applications/configuration-management/ansible/ansible-adhoc-commands/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ node1 | SUCCESS => {
263263

264264
### Create Directories
265265

266-
The [`file` module](https://docs.ansible.com/ansible/latest/modules/file_module.html) is used to create, remove, and set permissions on files and directories, and create symlinks. This command will create a directory at `/root/linode/new/` on the the managed node with the owner and permissions defined in the options:
266+
The [`file` module](https://docs.ansible.com/ansible/latest/modules/file_module.html) is used to create, remove, and set permissions on files and directories, and create symlinks. This command will create a directory at `/root/linode/new/` on the managed node with the owner and permissions defined in the options:
267267

268268
ansible Client -m file -a "dest=/root/linode/new/ mode=755 owner=root group=root state=directory" -u non_root_user --become -K
269269

docs/applications/configuration-management/chef/install-a-chef-server-workstation-on-ubuntu-14-04/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ published: 2015-06-10
1515
title: 'Install a Chef Server Workstation on Ubuntu 14.04'
1616
external_resources:
1717
- '[Chef](http://www.chef.io)'
18+
relations:
19+
platform:
20+
key: install-chef-workstation
21+
keywords:
22+
- distribution: Ubuntu 14.04
1823
---
1924

2025
Chef is an automation platform that "turns infrastructure into code," allowing users to manage and deploy resources across multiple servers, or *nodes*. Chef allows users to create and download recipes (stored in cookbooks) to automate content and policies on these nodes.

docs/applications/configuration-management/chef/install-a-chef-server-workstation-on-ubuntu-18-04/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ modified_by:
1212
name: Linode
1313
title: 'How To Install a Chef Server Workstation on Ubuntu 18.04'
1414
h1_title: 'Installing a Chef Server Workstation on Ubuntu 18.04'
15+
relations:
16+
platform:
17+
key: install-chef-workstation
18+
keywords:
19+
- distribution: Ubuntu 18.04
1520
aliases: ['/applications/configuration-management/install-a-chef-server-workstation-on-ubuntu-18-04/']
1621
---
1722

docs/applications/configuration-management/puppet/install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-16-04/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ external_resources:
2222
- '[Facter](https://docs.puppet.com/facter/)'
2323
deprecated: true
2424
deprecated_link: 'applications/configuration-management/install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-18-04/'
25+
relations:
26+
platform:
27+
key: install-puppet-mysql-hiera
28+
keywords:
29+
- distribution: Ubuntu 16.04
2530
aliases: ['/applications/configuration-management/install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-16-04/']
2631
---
2732

docs/applications/configuration-management/puppet/install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-18-04/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ external_resources:
1919
- '[The Puppet Forge](https://forge.puppet.com/)'
2020
- '[Hiera documentation](https://docs.puppet.com/hiera/)'
2121
- '[Facter](https://docs.puppet.com/facter/)'
22+
relations:
23+
platform:
24+
key: install-puppet-mysql-hiera
25+
keywords:
26+
- distribution: Ubuntu 18.04
2227
aliases: ['/applications/configuration-management/install-and-manage-mysql-databases-with-puppet-hiera-on-ubuntu-18-04/']
2328
---
2429

docs/applications/configuration-management/puppet/use-puppet-modules-to-create-a-lamp-stack-ubuntu-18-04-master/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ modified_by:
1111
name: Linode
1212
published: 2015-01-25
1313
title: Use Puppet Modules to Create a LAMP Stack
14+
relations:
15+
platform:
16+
key: install-puppet-lamp-master
17+
keywords:
18+
- distribution: Ubuntu 18.04
1419
---
1520

1621
![Use Puppet Modules to Create a LAMP Stack](Use_Puppet_Modules_to_Create_a_LAMP_Stack_smg.jpg)

docs/applications/configuration-management/puppet/use-puppet-modules-to-create-a-lamp-stack/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ modified_by:
1414
name: Elle Krout
1515
published: 2015-11-12
1616
title: Use Puppet Modules to Create a LAMP Stack
17+
relations:
18+
platform:
19+
key: install-puppet-lamp-master
20+
keywords:
21+
- distribution: Ubuntu 14.04
1722
---
1823

1924
![Use Puppet Modules to Create a LAMP Stack](Use_Puppet_Modules_to_Create_a_LAMP_Stack_smg.jpg)

docs/applications/configuration-management/terraform/create-a-nodebalancer-with-terraform/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Run the `apply` command:
276276

277277
terraform apply
278278

279-
You will be prompted to approve the `apply` action. Type *yes* and hit **Enter**. Terraform will begin to create the resources you have configured in the previous steps. This will take a few minutes, after which you will start to see the output of the the `remote-exec` commands you defined in your Linode instance resource. Once all of the actions are completed you should see output like the following:
279+
You will be prompted to approve the `apply` action. Type *yes* and hit **Enter**. Terraform will begin to create the resources you have configured in the previous steps. This will take a few minutes, after which you will start to see the output of the `remote-exec` commands you defined in your Linode instance resource. Once all of the actions are completed you should see output like the following:
280280

281281
{{< output >}}
282282
Apply complete! Resources: 7 added, 0 changed, 0 destroyed.

docs/applications/configuration-management/terraform/how-to-deploy-secure-linodes-using-cloud-firewalls-and-terraform/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ modified_by:
1111
name: Linode
1212
title: "How To Deploy Secure Linodes using Cloud Firewalls and Terraform"
1313
h1_title: "Deploying Secure Linodes using Cloud Firewalls and Terraform"
14+
image: feature.png
1415
contributor:
1516
name: Leslie Salazar
1617
link: https://github.com/leslitagordita/

docs/applications/configuration-management/vault/use-hashicorp-vault-for-secret-management/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Vault solves these and other problems in a number of ways, including:
4545

4646
Before continuing, you should familiarize yourself with important Vault terms and concepts that will be used later in this guide.
4747

48-
- A **token** is the the underlying mechanism that underpins access to Vault resources. Whether a user authenticates to Vault using a GitHub token or an application-driven service authenticates using an [AppRole](https://www.vaultproject.io/docs/auth/approle.html) RoleID and SecretID, all forms of authentication are eventually normalized to a **token**. Tokens are typically short-lived (that is, expire after a period or time-to-live, or `ttl`) and have one or more *policies* attached to them.
48+
- A **token** is the underlying mechanism that underpins access to Vault resources. Whether a user authenticates to Vault using a GitHub token or an application-driven service authenticates using an [AppRole](https://www.vaultproject.io/docs/auth/approle.html) RoleID and SecretID, all forms of authentication are eventually normalized to a **token**. Tokens are typically short-lived (that is, expire after a period or time-to-live, or `ttl`) and have one or more *policies* attached to them.
4949
- A Vault **policy** dictates certain actions that may be performed upon a Vault **path**. Capabilities such as the ability to read a secret, write secrets, and delete them are all examples of actions that are defined in a policy for a particular **path**.
5050
- A **path** in Vault is similar in form to a Unix filesystem path (like `/etc`) or a URL (such as `/blog/title`). Users and machine accounts interact with Vault over particular paths in order to retrieve secrets, change settings, or otherwise interact with a running Vault service. All Vault access is performed over a REST interface, so these paths eventually take the form of an HTTP URL. While some paths interact with the Vault service itself to manage resources such as policies or settings, many paths serve as an endpoint to either authenticate to Vault or interact with a **secret engine**.
5151
- A **secret engine** is a backend used in Vault to provide secrets to Vault users. The simplest example of a **secret engine** is the [key/value backend](https://www.vaultproject.io/docs/secrets/kv/index.html), which simply returns plain text values that may be stored at particular paths (these secrets remain encrypted on the backend). Other examples of secret backends include the [PKI backend](https://www.vaultproject.io/docs/secrets/pki/index.html), which can generate and manage TLS certificates, and the [TOTP backend](https://www.vaultproject.io/docs/secrets/totp/index.html), which can generate temporary one-time passwords for web sites that require multi-factor authentication (including the Linode Manager).

docs/applications/media-servers/install-plex-media-server-on-centos-7/index.md

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ title: Install Plex Media Server on CentOS 7
1414
external_resources:
1515
- '[Plex Media Server Documentation](https://support.plex.tv/hc/en-us/categories/200007567-Plex-Media-Server)'
1616
dedicated_cpu_link: true
17+
relations:
18+
platform:
19+
key: how-to-install-plex
20+
keywords:
21+
- distribution: CentOS 7
1722
---
1823

1924
[Plex](https://www.plex.tv/) is a feature-rich media library platform that allows you to organize and stream your digital video and audio from virtually anywhere. Basic Plex features are [free](https://support.plex.tv/articles/202526943-plex-free-vs-paid/), while the paid Plex Pass adds additional features.

0 commit comments

Comments
 (0)