Created
May 16, 2019 23:28
-
-
Save jbelmont/167a7390b0a92602423ac97dad7fd8f8 to your computer and use it in GitHub Desktop.
Workshop Setup for NoSQL Part II
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
So in the README.md I put instructions https://github.com/jbelmont/nosql-workshop/blob/master/README.md | |
Please make sure you have installed docker in your machine. | |
Then pull down mongo image with following command: | |
Install my mongo image: | |
docker pull jbelmont/nosql-mongo-image-with-scripts:v1 | |
Next I would run the following script in the repository: | |
sh scripts/run-mongo-shell-with-script-files-image.sh | |
Install Mongo Client with instructions in README: https://github.com/jbelmont/nosql-workshop/blob/master/README.md#install-the-mongo-client | |
Enter mongo shell: | |
mongo localhost:27017 | |
In the repository and book I have a set of files and as long as docker container is running and the scripts files are loaded you can execute like this: | |
mongo scripts/create-articles-collection.js | |
Run script inside of a running container like this: | |
docker exec -it $(docker ps -a | awk '/jbelmont/ { print $1 }') /bin/bash | |
this gets you in the container and next enter: | |
mongo | |
then execute a script like this: | |
load("scripts/create-people-collection.js") | |
I have this is sufficient instructions, but I always help everyone setup at the beginning of the workshop as best as I can. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment