Created
December 5, 2017 20:24
-
-
Save sriharrsha/a6d98ea6d995faae4b0402e84d0e59e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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