You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2024/07/07 10:40:10 UTC

(openserverless) 04/23: initial cloudinit

This is an automated email from the ASF dual-hosted git repository.

msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless.git

commit 267b75de19e7355c09d51ecadb5589e83639fb3e
Author: Michele Sciabarra <mi...@nuvolaris.io>
AuthorDate: Sat Jul 6 10:20:52 2024 +0200

    initial cloudinit
---
 README.md       | 43 +++++++++++++++++++++++++++++++++++++++++++
 cloud-init.yaml | 12 ++++++++++++
 2 files changed, 55 insertions(+)

diff --git a/README.md b/README.md
index 3fdc4ec..3f77359 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,44 @@
 # Apache OpenServerless
+
+Welcome to [Apache OpenServerless](https://cwiki.apache.org/confluence/display/INCUBATOR/OpenServerlessProposal), shortened **AOS**, an incubating project at the [Apache Software Foundation](https://www.apache.org).
+
+This readme provides development information. For user informations refer to the [website](https://openserverless.apache.org) (not yet available).
+
+## Development Enviroment Overview
+
+AOS is a complex projects with lots of dependencies. It also needs a Kubernetes to be executed, hence tested  and developed.
+
+In order to bootstrap easily the development environment for the project, we use virtual machines initialized with [cloud-init](https://cloud-init.io/) to setup a development environment.
+
+As an IDE we use  [VSCode](https://code.visualstudio.com/)] as it allows [Remote Development](https://code.visualstudio.com/docs/remote/remote-overview) within the virtual machine.
+
+You can setup your development virtual machine in cloud or you can configure it locally in your workstation. 
+
+You need a virtual machine with at least 8g of memory and 4 VCPU so your development workstation probably needs 16GB and 8VCPU of memory at least.
+
+## Setup the Development Virtual Machine
+
+Here we see how to setup the development environment in variuos scenarios.
+
+### Setup a development environment in Linux and Mac
+
+The method we use to setup a VM in Linux and Mac is using [multipass](https://multipass.run/). 
+
+- On Mac, if you already have [brew](https://brew.sh/), installing it is as easy as to type `brew install multipass`.
+
+- On Linux, if you already have [snap](https://snapcraft.io/), installing it is as easy as type `sudo snap install multipass`
+
+-  Otherwise follow [those instructions](https://multipass.run/install)
+
+Once you have `multipass` type
+
+```
+multipass launch -nopenserverless -c4 -d20g -m8g --cloud-init cloud-init.yaml
+```
+
+Once you have finished,  ensure you have backed up all your files. Then use 
+
+```
+multipass delete openserverless
+multipass purge
+```
diff --git a/cloud-init.yaml b/cloud-init.yaml
new file mode 100644
index 0000000..9e2c67f
--- /dev/null
+++ b/cloud-init.yaml
@@ -0,0 +1,12 @@
+#cloud-config
+
+apt_update: true
+apt_upgrade: true
+
+runcmd:
+ - >
+   curl -sfL https://get.k3s.io | sh -
+ - >
+   curl -L https://nixos.org/nix/install 
+   | sudo -u "$(getent passwd 1000 | awk -F: '{print $1}')"  sh -s -- --daemon
+ 
\ No newline at end of file