https://www.orchest.io/ logo
Title
i

Igor Wiese

06/14/2022, 4:27 PM
Hi Team. I have two questions. 1) I followed the tutorial and installed the Orchest using the convenience_install.sh. Is there a way to change the code and reflect changes as previous version by using orchest --dev? 2) Is there any documentation helping to access orchest outside of localhost (externally). following the convenience_install.sh, the installation process is on localhost, right?
r

Rick Lamers

06/14/2022, 6:33 PM
1. Assuming you’re asking about how to do development on Orchest (changing code and seeing code change of Orchest itself reflected in the application). You’d basically need to do two things: a) make sure
minikube
has the repository mounted (details here: https://docs.orchest.io/en/stable/development/development_workflow.html#cluster-for-development). If you ran the convenience script, you’d actually need to delete the
minikube
cluster that was created, because
minikube
doesn’t allow mounting a host folder after the cluster has been created. b) you need to run the right commands to have the local build process running and Orchest started with the right flag such that it uses files in the mounted directory (details here: https://docs.orchest.io/en/stable/development/development_workflow.html#incremental-development-hot-reloading). The main commands are
pnpm i
,
orchest patch --dev
, and
pnpm run dev
. 2. At a high level you need to use a reverse proxy that makes the Orchest server running in
minikube
accessible on the localhost network interface of the instance. Two good options would be
nginx
or minikube tunnel.
nginx
is a bit more robust, and would entail the following steps (the latter,
minikube tunnel
, is just running that command to forward localhost traffic to the Orchest server running in
minikube
). The
nginx
steps: 1. Install
nginx
(this example is for Debian based systems like Ubuntu):
sudo apt-get install nginx
2. Place our example site config (see
<http://localorchest.io|localorchest.io>
below) in
/etc/nginx/sites-available/localorchest.io
3. Place it in
/etc/nginx/sites-available/localorchest.io
and activate by creating a symlink using:
sudo ln -s /etc/nginx/sites-available/localorchest.io /etc/nginx/sites-enabled/
4. Remove default
nginx
server
sudo truncate -s 0 /etc/nginx/sites-available/default
5. Restart
nginx
sudo service nginx restart
6. Add the
minikube
IP to the hosts file
minikube ip | xargs printf "%s <http://localorchest.io|localorchest.io>" | sudo tee -a  /etc/hosts
7. (Make sure port 80 is accessible in Ubuntu/your cloud firewall settings) If you want to enable SSL you’d need to add a load balancer/reverse proxy in front of your server that handles SSL or configure
nginx
to expose its endpoint using SSL encryption. Soon you can skip all of the above and use our
k8s
hosted version on https://cloud.orchest.io 😄
<http://localorchest.io|localorchest.io>
config file:
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
	listen 80 default_server;
	listen [::]:80 default_server;

	location / {
		proxy_pass <http://localorchest.io>;

		# For project or file manager uploads.
		client_max_body_size 0;

		# WebSocket support.
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection $connection_upgrade;
		proxy_read_timeout 86400;
	}
}
i

Igor Wiese

06/14/2022, 6:57 PM
thank you @Rick Lamers. I will try to follow the steps
Hi @Rick Lamers , or anyone that may help
I basically ran: corinthians@condor3459:*~/orchest*$ minikube delete corinthians@condor3459:*~/orchest*$ minikube start \ --cpus 6 \ --mount-string=“$(pwd):/orchest-dev-repo” --mount corinthians@condor3459:*~/orchest*$ minikube addons enable ingress corinthians@condor3459:*~/orchest*$ pnpm i Scope: all 6 workspace projects Lockfile is up-to-date, resolution step is skipped Already up-to-date corinthians@condor3459:*~/orchest*$ orchest patch --dev Patching the Orchest Cluster. Failed to pass gate: The Orchest Cluster named ‘cluster-1’ in namespace ‘orchest’ could not be found. Failed to disable telemetry. Continuing. Note that when running in dev mode you need to have mounted the orchest repository into minikube. For example by running the following when creating the cluster, while being in the repo: ‘minikube start --memory 16000 --cpus 12 --mount-string=“$(pwd):/orchest-dev-repo” --mount’. The behaviour of mounting in minikube is driver dependant and has some open issues, so try to stay on the proven path. A cluster created through the scripts/install_minikube.sh script, for example, would lead to the mount only working on the master node, due to the kvm driver. Traceback (most recent call last): File “/home/corinthians/.local/lib/python3.9/site-packages/orchestcli/cmds.py”, line 1133, in _get_namespaced_custom_object custom_object = get_namespaced_custom_object(
n

Nick Post

06/14/2022, 8:58 PM
After deleting minikube you need to run install and start first. Then you can run the patch command successfully. Sorry if this is confusing.
i

Igor Wiese

06/14/2022, 9:46 PM
you mean orchest install orchest start then orchest patch --dev ?
👍 1
r

Rick Lamers

06/14/2022, 10:40 PM
Exactly
Sorry if that wasn't clear in my initial explanation
👍 1
i

Igor Wiese

06/15/2022, 11:25 AM
I got it. Now i am trying to use nginx to export my local instance. Lets see 😬
It worked!!! YES! thank you @Rick Lamers and @Nick Post. I hope i can learn the code and help with the project in the future 🙂.
🙌 2
r

Rick Lamers

06/16/2022, 7:35 AM
So awesome! Glad you got it working. If you ever want to do some pair-programming happy to help. We can share more about the Orchest internals etc.
👍 1