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
| """ | |
| The s3fs package would need to be installed using conda install | |
| conda install -c anaconda s3fs | |
| """ | |
| from s3fs.core import S3FileSystem | |
| import configparser |
| """ | |
| 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 |