From 40e0296c8aca24c9f8dd99092b3eb66d064df797 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 19 May 2022 18:45:49 +0200 Subject: [PATCH] docs(machine setup): for contribution Signed-off-by: rjshrjndrn --- scripts/dev_env/README.md | 6 ++ scripts/dev_env/colima/README.md | 78 +++++++++++++++++++++++ scripts/{ => dev_env}/vagrant/README.md | 10 --- scripts/{ => dev_env}/vagrant/Vagrantfile | 0 4 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 scripts/dev_env/README.md create mode 100644 scripts/dev_env/colima/README.md rename scripts/{ => dev_env}/vagrant/README.md (84%) rename scripts/{ => dev_env}/vagrant/Vagrantfile (100%) diff --git a/scripts/dev_env/README.md b/scripts/dev_env/README.md new file mode 100644 index 000000000..57a989030 --- /dev/null +++ b/scripts/dev_env/README.md @@ -0,0 +1,6 @@ +## For setting up development environment, follow the guide. + +- For Intel/AMD machines + Use [vagrant](vagrant/) +- For Mac M1 + Use [colima](colima/) diff --git a/scripts/dev_env/colima/README.md b/scripts/dev_env/colima/README.md new file mode 100644 index 000000000..7fcf00732 --- /dev/null +++ b/scripts/dev_env/colima/README.md @@ -0,0 +1,78 @@ +## Installing Colima + +[Colima](https://github.com/abiosoft/colima) is a container runtime environment, which makes it possible to run x64 images in Mac M1 easily. + +```bash +brew install --head colima +brew install docker kubectl helm k9s stern +``` + + + +```yaml +colima start --with-kubernetes --cpu 2 --memory 8 -p openreplay +``` + +## Installing OpenReplay + +```yaml +git clone https://github.com/openreplay/openreplay -b dev +cd openreplay/scripts/helmcharts +SKIP_K8S_INSTALL=true SKIP_K8S_TOOLS=true gDOMAIN_NAME=openreplay.local bash -x init.sh +``` + +## Updating DNS + + +```bash +sudo vim /etc/hosts +127.0.0.1 openreplay.local +``` + +## Access Openreplay + +Go to [http://openreplay.local](http://openreplay.local) in your browser and signup to create an account. + +For recording a session, in the tracker, enable `__DISABLE_SECURE_MODE: false`, as openreplay running without SSL locally. + +For more information, refer [here](https://docs.openreplay.com/installation/javascript-sdk#security). + + +## Troubleshoot + +1. Colima error for copying context + + + + **Solution** + + ```yaml + colima ssh -p openreplay + cat echo;/etc/rancher/k3s/k3s.yaml;echo + # copy output and exit from the shell + + # In your local machine + cd ~/.kube || ( mkdir ~/.kube && cd ~/.kube) + # past from buffer and save file + vim openreplay-local.yaml + export KUBECONFIG=~/.kube/openreplay-local.yaml + ``` + +2. if minio is crashlooping + + ```yaml + # in vars.yaml + minio: + resources: + limits: + cpu: 512m + ``` + +Having trouble setting up this plugin? Please connect to our [Slack](https://slack.openreplay.com/) and get help from our community. diff --git a/scripts/vagrant/README.md b/scripts/dev_env/vagrant/README.md similarity index 84% rename from scripts/vagrant/README.md rename to scripts/dev_env/vagrant/README.md index 5262930ba..2e7a3562a 100644 --- a/scripts/vagrant/README.md +++ b/scripts/dev_env/vagrant/README.md @@ -1,7 +1,3 @@ - - ### Installation - Vagrant: [https://www.vagrantup.com/downloads](https://www.vagrantup.com/downloads) @@ -42,12 +38,6 @@ Use the following instructions if you’re running Windows 10 or Windows 8: http://openreplay.local/signup ``` -### To start developing - -- [Frontend](../../frontend/development.md) -- [API](../../api/development.md) -- [Backend](../../backend/development.md) - ### Notes It’ll be a good practice to take a snapshot once the initial setup is complete, so that if something is not working as expected, you can always fall back to a stable known version. diff --git a/scripts/vagrant/Vagrantfile b/scripts/dev_env/vagrant/Vagrantfile similarity index 100% rename from scripts/vagrant/Vagrantfile rename to scripts/dev_env/vagrant/Vagrantfile