Skip to content

Instantly share code, notes, and snippets.

@sriharrsha

sriharrsha/INIT.SH

Created Dec 5, 2017
Embed
What would you like to do?
RUN python /opt/C3STEM/DB/c2sumo_schema_nashville.py
RUN python /opt/C3STEM/DB/users.py
RUN echo 'import pymongo\n\
import docker\n\
import os\n\
from pymongo import MongoClient\n\
from bson.objectid import ObjectId\n\
\n\
client = docker.from_env()\n\
connection = MongoClient((os.getenv('MONGO_URI'))\n\
db = connection.c3stem_database\n\
\n\
ip = "127.0.0.1"\n\
db.virtualmachine.insert({\n\
"_id": ip,\n\
"flavor": "m1.medium",\n\
"private_IP": ip,\n\
"public_IP": ip,\n\
"key_name": "id_rsa",\n\
"type": "TRANSIENT",\n\
"status": "AVAIL",\n\
"user": "ALL",\n\
"mode": "GROUP"});' >/opt/C3STEM/DB/cloud.py
RUN python /opt/C3STEM/DB/cloud.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment