Skip to content

Commit 62232c4

Browse files
authored
Update README.md
1 parent 13d8473 commit 62232c4

File tree

1 file changed

+2
-53
lines changed

1 file changed

+2
-53
lines changed

README.md

+2-53
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ CMD vncserver && websockify -D --web=/usr/share/novnc/ --cert=~/novnc.pem 80 loc
3434
3535
````
3636

37-
1. Replace the COPY keen /dos/keen with your game (ie. COPY wolf3d /dos/wolf3d). 1. You can also change the default password, or override it with a -e parameter when you run the image.
38-
1. Now, with Docker, build the image. I’m assuming you already have Docker installed and are familiar with it to some extent. CD to the directory in a console and run the command…
37+
1. Build the image. I’m assuming you already have Docker installed and are familiar with it to some extent. CD to the directory in a console and run the command…
3938
````
4039
docker build -t mydosbox .
4140
````
@@ -45,56 +44,6 @@ CMD vncserver && websockify -D --web=/usr/share/novnc/ --cert=~/novnc.pem 80 loc
4544
````
4645

4746
1. Open a browser and point it to http://localhost:6080/vnc.html
48-
1. You should see a prompt for the password. Type it in, and you should be able to connect to your container with DosBox running. The game is started automatically.
47+
1. You should see a prompt for the password. Type it in, and you should be able to connect to your container with DosBox running.
4948
1. Once your image is built, you can push it to your image repository with docker push, but you’ll need to tag it appropriately.
5049

51-
# USE WITH KUBERNETES
52-
Kubernetes is another part of the equation when it comes to container apps. Containers on Kubernetes are deployed into pods, which are then usually a part of a part of a deployment, which will have one or more pods associated with it. Deployments can also be used for creating scalable sets of pods for high availability too on a Kubernetes cluster. If you’re not familiar with Kubernetes, check out this webinar below where I go in depth on the matter.
53-
54-
Deployments and services can be defined declaratively with a YAML file. Below is a Kuberenetes YAML file that defines a deployment and a service for my retro gaming container.
55-
56-
The deployment is simple – it points to a single container image called blaize/keen and then tells Kubernetes what ports to expose for the container. The service defines how the deployment will be exposed on a network. In this case, it’s using a TCP load balancer, where it is exposing port 80 and mapping that to the port exposed by the deployment. The service uses selectors on the label app to match the service with the deployment.
57-
58-
````
59-
apiVersion: v1
60-
kind: Service
61-
metadata:
62-
name: keen-service
63-
labels:
64-
app: keen-deployment
65-
spec:
66-
ports:
67-
- port: 80
68-
targetPort: 6080
69-
selector:
70-
app: keen-deployment
71-
type: LoadBalancer
72-
---
73-
apiVersion: apps/v1
74-
kind: Deployment
75-
metadata:
76-
name: keen-deployment
77-
spec:
78-
selector:
79-
matchLabels:
80-
app: keen-deployment
81-
replicas: 1
82-
template:
83-
metadata:
84-
labels:
85-
app: keen-deployment
86-
spec:
87-
containers:
88-
- name: master
89-
image: blaize/keen
90-
ports:
91-
- containerPort: 80
92-
````
93-
94-
To connect use this, first create a file called keen.yaml file, configure your instance kubectl to work with your instance of Kubernetes, then run deploy the sample.
95-
96-
````
97-
kubectl create -f keen.yaml
98-
````
99-
100-
When this is deployed to Kubernetes, Kubernetes will configure the external network to open on port 80 to listen to incoming requests. When used on Azure Kubernetes Services, AKS will create and map a public IP address (htttp://[your ip address]/vnc.html) for the service. Once connected, you can point your browser to the IP address of your cluster and have fun playing your retro games!

0 commit comments

Comments
 (0)