In the example below /dev/sdb was presented to the VM. You would use whatever disk was presented in your setup.
- Get the disks presented to the system
fdisk -l
- Create the partition on the disk. Using fdisk but you can use others i.e. gdisk
""" | |
Import the cassandra libraries that will be needed to connect to the cassandra cluster. | |
Note: Currently the cassandra-driver is only available for python 2.7 on conda-forge | |
Example install of package | |
conda install -c conda-forge cassandra-driver | |
""" | |
from cassandra.auth import PlainTextAuthProvider | |
from cassandra.cluster import Cluster |
""" | |
To connect to mysql you would need to conda install the mysql-connector-python conda package | |
conda install -c anaconda mysql-connector-python | |
""" | |
import mysql.connector as mysql | |
import json | |
# Get credentials from kubernetes. The credentials were setup as a dictionary |
""" | |
To start working with Neo4j you would need to pip install the package. | |
pip install neo4j | |
Documentation is located here: | |
https://neo4j.com/docs/api/python-driver/current/ | |
""" | |
from neo4j import GraphDatabase |
""" | |
To connect to mariadb you would need to conda install the mysql-connector-python package | |
conda install -c anaconda mysql-connector-python | |
""" | |
import mysql.connector as mariadb | |
import json | |
# Read the credentials from secret |
""" | |
In order to connect to oracle the following packages will need to be installed from conda. | |
cx_oracle | |
oracle-instantclient | |
libaio | |
""" | |
# Import the library needed | |
import cx_Oracle |
""" | |
Package psycopg2 must be installed through conda for this to work | |
conda install -c anaconda psycopg2 | |
""" | |
import psycopg2 | |
import json | |
# Get credentials from kubernetes. The credentials were setup as a dictionary |
""" | |
pymongo will need to be installed from conda for things to work properly | |
conda install -c anaconda pymongo | |
""" | |
import pymongo | |
import json | |
""" | |
Connect to the mongo server. In the example it is using the default auth mechanism |
""" | |
Installing the connector it is recommended to use pip and not the conda-forge package | |
pip install snowflake-connector-python | |
""" | |
import snowflake.connector | |
import json | |
# Get credentials from kubernetes. The credentials were setup as a dictionary so will use json to load |
""" | |
In order to use the example you must install pymssql from conda | |
conda install -c anaconda pymssql | |
""" | |
import pymssql | |
# Using an ini style credentials file for example so will use configparser | |
import configparser |