- Have Docker installed on your system
- Install the MongoDB CLI
- Change directory to the workspace for your local Mongo DB
cd /jumpcloud-escalations-engineer-assignment/mongodb
- Pull down mongo community image
docker pull mongo
- Replace the path specified under volumes in the provided docker-compose.yml file to the path to the mongodb directory
- Start the mongo service
docker-compose up -d
- Get the container id for the new mongo container
docker ps
- Copy the provided
.json
files to the docker container
docker cp employees.json {CONTAINER_ID}:/
docker cp beers.json {CONTAINER_ID}:/
docker cp patrons.json {CONTAINER_ID}:/
- Connect to the mongo docker container
docker exec -it jcmongo bash
- Import the database backups
mongoimport --db=brewery --collection=beers --file=beers.json
mongoimport --db=brewery --collection=employees --file=employees.json
mongoimport --db=brewery --collection=patrons --file=patrons.json
- Either close connection to docker container or open a new terminal and ensure database is accessible by running:
mongo mongodb://127.0.0.1:27017/brewery
- Create and provide a script with logging to achieve each of the following:
- We’re coming out with a new hoppy delicious IPA. To let our customers know, we need two mailing lists.
- One that includes the email addresses of all of our customers
- Another that includes only the email addresses for customers whose favorite beer is an IPA.
- We need to gather some data on our tap rooms to show which is the most popular location. We need to know how many customers have frequented each location between 1/1/2024 - 4/1/2024.
- We’re trying to determine what type of beer is most popular with our customers so we can determine what our next experimental beer should be! Can you provide us with an array of objects that include the beer name, type, and number of customers where that beer is their favorite?
- Provide the output results for each of these requests.
- Create a free JumpCloud Organization - You will receive access to a free JumpCloud account for assignment purposes:
- JumpCloud will send you a link to sign up for an account, you won’t have to reach out to anyone to get set up with an organization
- JumpCloud will have full access to your testing environment
- Once you receive the email (Subject Line: JumpCloud Administrator Account Setup) notifying you that you’ve been made an administrator on a JumpCloud account, you have one hour to reset your password before it times out. Please take care of this in the window allotted to you
- If you miss this window, please email [email protected]
- Install the JumpCloud Agent on a system (Mac, Windows, or Linux)
- Using the programming language of your choice (Go or JavaScript preferred), complete the following and provide your solution for each:
- Create and activate 2 Users
- Create a Group of Users
- Associate Users to the Group of Users
- Associate one User to the recently added system in JumpCloud
-
Log in to the system as the JumpCloud managed user
-
Set agent logs to DEBUG on your system and provide a copy of the agent logs
-
Configure LDAP for your organization in the JumpCloud Admin Portal
-
Add two user groups to your LDAP directory, each user group containing at least 2 unique users
-
Using a seperate BindDN user query your LDAP directory over SSL using 'ldapsearch' and show:
1.) All users bound to LDAP in your organization
2.) Just the users in one specifc user group (your choice of the two groups you created) and only returning the users email, firstname, and lastname