re-organizing, again...
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,8 +1,3 @@
|
||||
worker/
|
||||
dist/
|
||||
node_modules/
|
||||
package-lock.json
|
||||
|
||||
# don't accidentally commit OS images (again...)
|
||||
*.img
|
||||
*.raw
|
||||
|
@@ -45,9 +45,9 @@ RUN chmod +x /usr/local/bin/tini
|
||||
# do everything as an unprivileged user :)
|
||||
RUN useradd -m vm
|
||||
|
||||
# copy boot script and Windows HDD (must be at ./hdd/hdd.img)
|
||||
COPY bin/boot.rb /usr/local/bin/boot-vm
|
||||
COPY --chown=vm hdd/hdd.img /home/vm/hdd.img
|
||||
# copy boot script and Windows HDD (must be at ./container/hdd/hdd.img)
|
||||
COPY container/bin/boot.rb /usr/local/bin/boot-vm
|
||||
COPY --chown=vm container/hdd/hdd.img /home/vm/hdd.img
|
||||
|
||||
# make double sure the boot script is executable & the hard drive was copied
|
||||
RUN chmod +x /usr/local/bin/boot-vm \
|
@@ -1,10 +1,10 @@
|
||||
# 💾 [Y2K Sandbox](https://y2k.jarv.is/) [](https://y2k.jarv.is/) [](https://status.jrvs.io/785127956)
|
||||
|
||||
Nostalgic time machine powered by on-demand Windows Me® VMs, [my first website](https://github.com/jakejarvis/my-first-website), and quarantine boredom. 📟
|
||||
Nostalgic time machine powered by on-demand Windows Me® VMs, [my first website](https://jakejarvis.github.io/my-first-website/), and quarantine boredom. 📟
|
||||
|
||||
This branch contains the backend scripts and Windows Me container. The frontend website code is in [the `gh-pages` branch](https://github.com/jakejarvis/y2k/tree/gh-pages).
|
||||
|
||||
[**📝 Read the blog post here.**](https://jarv.is/notes/y2k-land/)
|
||||
[**📝 Read the blog post here.**](https://jarv.is/notes/y2k-sandbox/)
|
||||
|
||||
<p align="center"><a href="https://y2k.jarv.is/"><img width="600" src="screenshot.png"></a></p>
|
||||
|
||||
@@ -14,7 +14,7 @@ This branch contains the backend scripts and Windows Me container. The frontend
|
||||
- [QEMU](https://www.qemu.org/) (target i386)
|
||||
- [websocketd](https://github.com/joewalnes/websocketd)
|
||||
- [noVNC](https://github.com/novnc/noVNC)
|
||||
- [Cloudflare Workers](https://workers.cloudflare.com/) & [Argo Tunnel](https://www.cloudflare.com/products/argo-tunnel/)
|
||||
- [Cloudflare Argo Tunnel](https://www.cloudflare.com/products/argo-tunnel/)
|
||||
- [Microsoft Bob](https://en.wikipedia.org/wiki/Microsoft_Bob)
|
||||
|
||||
## Inspired By
|
||||
|
@@ -6,7 +6,7 @@ set -euxo pipefail
|
||||
YOU_ARE_HERE="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# container will be useless unless we bundle the actual OS
|
||||
test -f "$YOU_ARE_HERE"/hdd/hdd.img
|
||||
test -f "$YOU_ARE_HERE"/container/hdd/hdd.img
|
||||
|
||||
# this image is private on Google Cloud Registry, make sure we're logged in
|
||||
gcloud auth configure-docker
|
4
container/.gitignore
vendored
4
container/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
# don't accidentally commit OS images (again...)
|
||||
*.img
|
||||
*.raw
|
||||
*.qcow2
|
@@ -8,7 +8,7 @@ Type=simple
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
User=root
|
||||
ExecStart=/root/y2k/server/socket.sh
|
||||
ExecStart=/root/y2k/host/socket.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@@ -14,10 +14,6 @@ apt-get -y --no-install-recommends install \
|
||||
software-properties-common \
|
||||
unzip
|
||||
|
||||
#### install papertrail logging ####
|
||||
wget -qO - --header="X-Papertrail-Token: CHANGEMECHANGEMECHANGEME" \
|
||||
https://papertrailapp.com/destinations/CHANGEME/setup.sh | bash
|
||||
|
||||
#### install Docker from official repository ####
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
||||
apt-key fingerprint 0EBFCD88
|
||||
@@ -31,8 +27,8 @@ docker version
|
||||
|
||||
#### docker fixes ####
|
||||
## https://github.com/moby/moby/issues/4250
|
||||
# sed -i 's/\(GRUB_CMDLINE_LINUX="\)"/\1cgroup_enable=memory swapaccount=1"/' /etc/default/grub
|
||||
# update-grub
|
||||
sed -i 's/\(GRUB_CMDLINE_LINUX="\)"/\1cgroup_enable=memory swapaccount=1"/' /etc/default/grub
|
||||
update-grub
|
||||
|
||||
#### install websocketd ####
|
||||
## https://github.com/joewalnes/websocketd/releases
|
||||
@@ -60,7 +56,7 @@ cloudflared tunnel login
|
||||
#### install Google Cloud Registry credential helper ####
|
||||
## https://cloud.google.com/container-registry/docs/advanced-authentication#standalone-helper
|
||||
## https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases
|
||||
GCR_HELPER_VERSION=2.0.1
|
||||
GCR_HELPER_VERSION=2.0.2
|
||||
curl -fsSL https://github.com/GoogleCloudPlatform/docker-credential-gcr/releases/download/v${GCR_HELPER_VERSION}/docker-credential-gcr_linux_amd64-${GCR_HELPER_VERSION}.tar.gz | tar xz --to-stdout ./docker-credential-gcr > /usr/local/bin/docker-credential-gcr
|
||||
chmod +x /usr/local/bin/docker-credential-gcr
|
||||
docker-credential-gcr version
|
||||
@@ -76,7 +72,7 @@ docker pull gcr.io/jakejarvis/y2k:latest
|
||||
git clone https://github.com/jakejarvis/y2k.git /root/y2k
|
||||
|
||||
#### enable & start service ####
|
||||
cp /root/y2k/server/example.service /lib/systemd/system/y2k.service
|
||||
cp /root/y2k/host/example.service /lib/systemd/system/y2k.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable y2k
|
||||
systemctl start y2k
|
Reference in New Issue
Block a user