github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/docs/5-jackal-tutorials/3-deploy-a-retro-arcade.md (about) 1 # Deploying a Retro Arcade 2 3 ## Introduction 4 5 In previous tutorials, we learned how to [create a package](./0-creating-a-jackal-package.md), [initialize a cluster](./1-initializing-a-k8s-cluster.md), and [deploy a package](./2-deploying-jackal-packages.md). In this tutorial, we will leverage all that past work and deploy a fun application onto your cluster. 6 7 ## System Requirements 8 9 - You'll need an internet connection to grab the Jackal Package for the games example. 10 11 ## Prerequisites 12 13 Before beginning this tutorial you will need the following: 14 15 - The [Jackal](https://github.com/Racer159/jackal) repository cloned: ([git clone instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)) 16 - Jackal binary installed on your $PATH: ([Installing Jackal](../1-getting-started/index.md#installing-jackal)) 17 - [An initialized cluster](./1-initializing-a-k8s-cluster.md) 18 19 ## YouTube Tutorial 20 [](https://youtu.be/7hDK4ew_bTo "Deploying Packages with Jackal") 21 22 ## Deploying the Arcade 23 24 1. The `dos-games` package is easily deployable via `oci://` by running `jackal package deploy oci://defenseunicorns/dos-games:1.0.0-$(uname -m) --key=https://jackal.dev/cosign.pub`. 25 26 :::tip 27 28 You can publish your own packages for deployment too via `oci://`. See the [Store and Deploy Packages with OCI](./7-publish-and-deploy.md) tutorial for more information. 29 30 ::: 31 32 <iframe src="/docs/tutorials/package_deploy_deploy.html" width="100%" height="595px"></iframe> 33 34 2. If you did not use the `--confirm` flag to automatically confirm that you want to deploy this package, press `y` for yes. Then hit the `enter` key. 35 36 <iframe src="/docs/tutorials/package_deploy_deploy_bottom.html" width="100%" height="400px"></iframe> 37 38 ### Connecting to the Games 39 40 When the games package finishes deploying, you should get an output that lists a couple of new commands that you can use to connect to the games. These new commands were defined by the creators of the games package to make it easier to access the games. By typing the new command, your browser should automatically open up and connect to the application we just deployed into the cluster, using the `jackal connect` command. 41 42 <iframe src="/docs/tutorials/package_deploy_connect.html" width="100%"></iframe> 43 44  45 46 :::note 47 If your browser doesn't automatically open up, you can manually go to your browser and copy the IP address that the command printed out into the URL bar. 48 ::: 49 50 :::note 51 The `jackal connect games` will continue running in the background until you close the connection by pressing the `ctrl + c` (`control + c` on a mac) in your terminal to terminate the process. 52 ::: 53 54 ## Removal 55 56 1. Use the `jackal package list` command to get a list of the installed packages. This will give you the name of the games package to remove it. 57 58 <iframe src="/docs/tutorials/package_deploy_list.html" height="120px" width="100%"></iframe> 59 60 2. Use the `jackal package remove` command to remove the `dos-games` package. Don't forget the `--confirm` flag. Otherwise you'll receive an error. 61 62 <iframe src="/docs/tutorials/package_deploy_remove_no_confirm.html" width="100%" height="425px"></iframe> 63 64 3. You can also use the `jackal package remove` command with the jackal package file, to remove the package. Again don't forget the `--confirm` flag. 65 66 <iframe src="/docs/tutorials/package_deploy_remove_by_file.html" height="100px" width="100%"></iframe> 67 68 The dos-games package has now been removed from your cluster. 69 70 ## Troubleshooting 71 72 ### Unable to connect to the Kubernetes cluster 73 74 <iframe src="/docs/tutorials/troubleshoot_unreachable.html" width="100%" height="200px"></iframe> 75 76 :::info Remediation 77 78 If you receive this error, either you don't have a Kubernetes cluster, your cluster is down, or your cluster is unreachable. 79 80 1. Check your kubectl configuration, then try again. For more information about kubectl configuration see [Configure Access to Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) from the Kubernetes documentation. 81 82 If you need to setup a cluster, you can perform the following. 83 84 1. Deploy a Kubernetes cluster with the [Creating a K8s Cluster with Jackal](./5-creating-a-k8s-cluster-with-jackal.md) tutorial. 85 2. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial. 86 87 After that you can try deploying the package again. 88 89 ::: 90 91 ### Secrets "jackal-state" not found 92 93 <iframe src="/docs/tutorials/troubleshoot_uninitialized.html" width="100%" height="250px"></iframe> 94 95 :::info Remediation 96 97 If you receive this error when jackal is attempting to deploy the `BASELINE COMPONENT`, this means you have not initialized the kubernetes cluster. This is one of the prerequisites for this tutorial. Perform the [Initialize a cluster](./1-initializing-a-k8s-cluster.md) tutorial, then try again. 98 99 ::: 100 101 ## Credits 102 103 :sparkles: Special thanks to these fine references! :sparkles: 104 105 - <https://www.reddit.com/r/programming/comments/nap4pt/dos_gaming_in_docker/> 106 - <https://earthly.dev/blog/dos-gaming-in-docker/>