Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 1.77 KB

getting_started.md

File metadata and controls

68 lines (52 loc) · 1.77 KB

Getting Started

Installing OPS

$ curl https://ops.city/get.sh -sSfL | sh

If that works you can try this simple hello world example. You don't need node installed for this as ops will automatically download a node package for you:

$ ops pkg load eyberg/node:20.5.0 -p 8083 -f -n -a hi.js

Note: We have a list of pre-made node packages on the repo if you are looking for a different version or need a different architecture (eg: arm for macs).

Put this in your hi.js:

var http = require('http');
http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello World\n');
}).listen(8083, "0.0.0.0");
console.log('Server running at http://127.0.0.1:8083/');

If the script complain about missing HomeBrew on Mac, please install it from https://brew.sh/ and re-run the command above.

On Linux and Mac ensure that you have QEMU version 2.5 or greater installed. It should be noted that the latest qemu version is 8.2 so if you are using something older - it's really old.

Debian / Ubuntu (apt-get) {#qemu-debian}

To install QEMU, run the following command:

$ sudo apt-get install qemu-kvm qemu-utils
Fedora (dnf/yum) {#qemu-fedora}
$ sudo dnf update
$ sudo dnf install qemu-kvm qemu-img

Or:

$ sudo yum update
$ sudo yum install qemu-kvm qemu-img

Verify the OPS Installation

$ ops version

Note: During the installation setup the PATH will be configured, and already open command shell windows may not be updated with these PATH modifications until the console is restarted or the user has logged out and in again.

If running ops version in the console fails, try source ~/.bash_profile or open a new terminal.