Skip to Content
Author's profile photo Simen Huuse

Super Mario on SAP Cloud Platform

Update 2018-09-20: Please read disclaimer at the bottom regarding copyrights.

 

So the little guy in blue overalls, red cap, mustache and a with a constant need for ‘shrooms decided to join the SAP Cloud Platform party! Originally my work here was to prove the combined strength of Github, Docker and SAP Cloud Platform , but as it turns out, it’s also quite entertaining.

Somehow, not everyone are convinced about the prior mentioned tools. Therefore, maybe a game is what it would take to get these guys on the believer side?

One single command get’s it running on Cloud Foundry. One.

The fine print would then contain the requirements that you have an SAP Cloud Platform Cloud Foundry account (trial or productive), that you have downloaded the command line interface and have logged in to your org and space. If this was new to you – go here.

So if you have this in place – one single command in your command prompt will get the build from docker, put the container in you Cloud Foundry space and start the whole thing.

What are the magical words, you ask?

cf push mario --docker-image pengbai/docker-supermario/ -m 512M --random-route

 

My point with this post is not to get you into playing games. It’s that using Docker with SAP Cloud Platform is really a beautiful thing!

 

Disclaimer: This code on github is open source under the “Unilicense” license. You can find the github code here: https://github.com/robertkleffner/mariohtml5 However, even if the code is free to copy and distribute, the product that the code generates may still be protected by copyright. It’s a bit messy and you can read more here: https://medium.com/@lrhodes/super-mario-bros-isnt-free-yet-93fca12ba59a
Any copy, use and distribution is on your own risk.

 

Assigned Tags

      7 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jakob Marius Kjær
      Jakob Marius Kjær

      Haha awesome experiment.

      Add it to the launchpad with a Mario logo ?

      Author's profile photo Simen Huuse
      Simen Huuse
      Blog Post Author

      Absolutely!

      And.. I would love to have on-screen buttons for mobile play [hint hint]. 🙂

      Author's profile photo Merve Gül
      Merve Gül

      Hi,

      It looks awesomely sweet!!! Where should I have to write this command down?

      Please guide me on the location of the file 🙂

      cf push mario --docker-image shuuse/mario_sap_scp_cf -m 512M --random-route

      Author's profile photo Simen Huuse
      Simen Huuse
      Blog Post Author

      Hi Merve,

      I think you should check out the link in this article. https://www.sap.com/developer/tutorials/hcp-cf-getting-started.html

      Good place to get started.

      Kind regards,

      Simen

      Author's profile photo Shibaji Chandra
      Shibaji Chandra

      Hi Simen,

      This is a nice one!!The potential to use the power of docker along with CF opens up the whole new world.

      Just wondering if I can run a docker Jenkins image in my trial CF.

      Like below may be:

      cf push myjenkins --docker-image jenkins/jenkins -m 2048M --random-rout

      Not sure... any idea??!!

       

       

      Author's profile photo Simen Huuse
      Simen Huuse
      Blog Post Author

      Hi Shibaji,

      Setting up Jenkins will take some tweaking of parameters to get it running - not sure if SAP CP CF gives you access to what you need here.

      I really don't think the trial accounts is logical place to run Jenkins, as it is a personal space that should only be used for sandboxing and personal training and no real development. Chances are you will spend a lot of time to set it up and have a really bad ROI on you time spent.

      Best,

      Simen

      Author's profile photo Nitesh Agrawal
      Nitesh Agrawal

      Hi Simen,

      I am getting below error in the logs while running on hanatrial account.

       

      2018-09-22T08:56:46.19+0530 [STG/0] OUT Staging...
      2018-09-22T08:56:46.31+0530 [STG/0] OUT Staging process started ...
      2018-09-22T08:56:46.31+0530 [STG/0] ERR Staging process failed: Exit trace for group:
      2018-09-22T08:56:46.31+0530 [STG/0] ERR builder exited with error: failed to fetch metadata from [pengbai/docker-su
      permario/] with tag [latest] and insecure registries [] due to invalid reference format
      2018-09-22T08:56:46.33+0530 [STG/0] OUT Exit status 2
      2018-09-22T08:56:46.33+0530 [STG/0] ERR Staging Failed: STG: Exited with status 2
      2018-09-22T08:56:46.34+0530 [STG/0] OUT Cell cc7c2027-c1e2-45a2-b126-401cc6af16b8 stopping instance b785b697-6ff0-4
      a04-808e-b958a0a537ec

       

      Regards,

      Nitesh