{"id":15705295,"url":"https://github.com/brahmlower/virtual-computer-science-lab","last_synced_at":"2025-03-30T15:25:58.120Z","repository":{"id":86081720,"uuid":"52753054","full_name":"brahmlower/Virtual-Computer-Science-Lab","owner":"brahmlower","description":"Virtual Computer Science Lab is a utility to create a set of virtual machines on Digital Ocean that can be used by members of a classroom or organization.","archived":false,"fork":false,"pushed_at":"2016-02-29T01:25:40.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T17:12:17.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brahmlower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-29T00:43:31.000Z","updated_at":"2016-10-25T10:58:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"d83aaae6-79c3-40b8-b1b3-0a122a30a1cb","html_url":"https://github.com/brahmlower/Virtual-Computer-Science-Lab","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"74c4743e2a0c8f550749b21e91bbeef3f0a9df02"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2FVirtual-Computer-Science-Lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2FVirtual-Computer-Science-Lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2FVirtual-Computer-Science-Lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2FVirtual-Computer-Science-Lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brahmlower","download_url":"https://codeload.github.com/brahmlower/Virtual-Computer-Science-Lab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246336595,"owners_count":20761082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T20:15:21.587Z","updated_at":"2025-03-30T15:25:58.096Z","avatar_url":"https://github.com/brahmlower.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual-Computer-Science-Lab\nVirtual Computer Science Lab is a utility to create a set of virtual machines on Digital Ocean that can be used by members of a classroom or organization.\n\nPlease note that at this time, this is just a proof of concept. The only utility provided is a script to create the VMs and SSH keys. All deletions will need to be done manually through your own provided scripts, or through the Digital Ocean management interface. If you want to change regions or images, you'll have to edit the hardcoded values in the script (this will be configurable some day, I promis).\n\n## Getting Started\nInstall python-digitalocean, then clone this repo. I've cloned the project into a folder with a short name, just for the sake of this example\n```\nuser:~/ $ pip install python-digitalocean\nuser:~/ $ git clone https://github.com/bplower/Virtual-Computer-Science-Lab.git vcsl\nuser:~/ $ cd vcsl\nuser:~/vcsl $ \n```\n\nNow make a new Digital Ocean API key (You can do that [here!](https://cloud.digitalocean.com/settings/api/tokens)). This file will be automatically read when you run the deploy script.\n```\nuser:~/vcsl $ echo \"YOUR API KEY GOES HERE\" \u003e digital_ocean_api_token\nuser:~/vcsl $ \n```\n\nMake a public keys directory, or change the hard coded value to an existing directory. If you don't already have your students public keys, get them from them somehow and save them in this directory. In this example, I'm just making brand new keys for our studends Jack and Jill.\n```\nuser:~/vcsl $ mkdir pub_keys\nuser:~/vcsl $ cd pub_keys\nuser:~/vcsl/pub_keys $ ssh-keygen -t rsa -b 4096 -f jack -P \"\"\nuser:~/vcsl/pub_keys $ ssh-keygen -t rsa -b 4096 -f jill -P \"\"\nuser:~/vcsl/pub_keys $ cd ../\nuser:~/vcsl $\n```\n\nMake sure the script is adding Jack and Jill to the lab. These arguments are \n* Student Name (not actually used anywhere at the moment...)\n* Username (used for somethings but I don't remember what exactly)\n* SSH Public Key Path (where pubKeyDir is set to \"pub_keys\" by default)\n```\nlab.students.append(Student(\"Jack\", \"jack\", pubKeyDir + \"/jack.pub\"))\nlab.students.append(Student(\"Jill\", \"jill\", pubKeyDir + \"/jill.pub\"))\n```\n\nNow run the script\n```\nuser:~/vcsl $ ./deploy\nCreating key:  student-jack\nCreating key:  student-jill\nCreating droplet: lab-jack\nCreating droplet: lab-jill\nuser:~/vcsl $\n```\n\nOn the Settings \u003e Security page, you will see that two new keys have been added.\n\u003cimg src=\"http://i.imgur.com/6UD27Lw.png\" alt=\"Jack and Jills SSH keys in Digital Ocean\"\u003e\n\nAnd on the droplets page, you will see that two new droplets have been created. Each droplet only has the key for the designated student, so that students don't have access to each others VMs. All you have to do now is tell each student what IP their box is at, and then they can SSH in.\n\u003cimg src=\"http://i.imgur.com/eyREyES.png\" alt=\"Jack and Jills Droplets in Digital Ocean\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrahmlower%2Fvirtual-computer-science-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrahmlower%2Fvirtual-computer-science-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrahmlower%2Fvirtual-computer-science-lab/lists"}