You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/ibm_cloud_code_engine/README.md
+29-32Lines changed: 29 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,32 +18,32 @@ limitations under the License.
18
18
19
19
# CodeFlare on IBM Cloud Code Engine
20
20
21
-
IBM Cloud Code Engine is a fully managed, serverless platform that runs your containerized workloads, including web apps, microservices, event-driven functions and batch jobs with run-to-completion characteristics.
21
+
IBM Cloud Code Engine is a fully managed, serverless platform that runs your containerized workloads, including web apps, microservices, event-driven functions, and batch jobs with run-to-completion characteristics.
22
22
23
-
CodeFlare Pipelines can use IBM Cloud Code Engine to seamlessly scale pipeline on a serverless backend.
23
+
CodeFlare can use IBM Cloud Code Engine to seamlessly scale pipelines on a serverless backend.
24
24
25
-
The following steps describe how to deploy the examples in [notebooks](./notebooks) on a serverless backend with Code Engine (they expand the steps to run Ray on Code Engine [here](https://www.ibm.com/cloud/blog/ray-on-ibm-cloud-code-engine))
25
+
The following steps describe how to deploy the examples in [notebooks](https://github.com/project-codeflare/codeflare/tree/develop/notebooks) on a serverless backend with Code Engine (they expand the steps to run Ray on Code Engine [here](https://www.ibm.com/cloud/blog/ray-on-ibm-cloud-code-engine))
26
26
27
27
## Install pre-requisities
28
28
29
-
Install the pre-requisites for Code Engine and Ray
29
+
Install the pre-requisites for Code Engine and Ray:
30
30
31
31
1. Get ready with IBM Code Engine:
32
32
33
33
-[Set up your Code Engine CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli)
34
-
-[Create your first Code Engine Project using the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project)
34
+
-[optional][Create your first Code Engine Project using the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project)
35
35
36
36
2.[Set up the Kubernetes CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
37
37
38
-
3. Install Kubernetes (assuming Ray and Python dependcies have been installed with the steps [here](../../README.md).
38
+
3. Install Kubernetes:
39
39
40
40
```shell
41
41
pip install kubernetes
42
42
```
43
43
44
44
## Step 1 - Define your Ray Cluster on Code Engine
45
45
46
-
If not already done, create a project in Code Engine:
46
+
If not already done in the previous step, create a Code Engine project:
Select the Code Engine project and switch the `kubectl` context to the project:
53
53
54
54
```shell
55
-
ibmcloud ce project select-n<your project name>-k
55
+
ibmcloud ce project select-n<your project name> -k
56
56
```
57
57
58
-
Extract the Kubernetes namespace assigned to your project. The namespace can be found in the NAME column intheoutput of the command:
58
+
Extract the Kubernetes namespace assigned to your project. The namespace can be found in the `NAME` column inthe output of the command:
59
59
60
60
```shell
61
61
kubectl get namespace
@@ -67,7 +67,7 @@ Export the namespace:
67
67
export NAMESPACE=<namespace from above>
68
68
```
69
69
70
-
Update With the following command you can download a basic Ray cluster definition and customize itfor your namespace:
70
+
A reference Ray cluster definition can be customizedfor your namespace with the following commands:
71
71
```shell
72
72
cd ./deploy/ibm_cloud_code_engine/
73
73
sed "s/NAMESPACE/$NAMESPACE/" ./example-cluster.yaml.template > ./example-cluster.yaml
@@ -76,45 +76,42 @@ sed "s/NAMESPACE/$NAMESPACE/" ./example-cluster.yaml.template > ./example-cluste
76
76
This reference deployment file will create a Ray cluster with following characteristics:
77
77
78
78
- a cluster named example-cluster with up to 10 workers using the Kubernetes provider pointing to your Code Engine project
79
-
- A head node type with 1 vCPU and 2GiB memory using the CodeFlare image codeflare:nightly
80
-
- A worker node type with 1 vCPU and 2GiB memory using the ray image codeflare:nightly
79
+
- A head node type with 1 vCPU and 2GB of memory using the CodeFlare image `codeflare:latest`
80
+
- A worker node type with 1 vCPU and 2GB memory using the ray image `codeflare:latest`
81
81
- The default startup commands to start Ray within the container and listen to the proper ports
82
82
- The autoscaler upscale speed is set to 2 forquick upscalingin this short and simple demo
83
83
84
84
## Step 2 - Start Ray cluster
85
85
86
-
You can start now the Ray cluster by running
87
-
```
86
+
You can now start the Ray cluster by running:
87
+
88
+
```shell
88
89
ray up example-cluster.yaml
89
90
```
90
91
91
-
This command will create the Ray head node as Kubernetes Pod in your Code Engine project. When you create the Ray cluster for the first time, it can take up to three minutes until the Ray image is downloaded from the Ray repository.
92
+
This command will create the Ray head node as Kubernetes Pod in your Code Engine project. When you create the Ray cluster for the first time, it can take few minutes until the Ray image is downloaded from the container registry.
92
93
93
94
## Step 3 - Run sample Pipeline with Jupyter
94
95
95
-
Edit the sample notebook to connect to a running Ray cluster with the command:
You can now access the Jupyter server by pointing your browser to the following url:
108
103
109
-
Set up access to Jupyter notebook:
110
-
< how to obtain the token >
104
+
```shell
105
+
http://127.0.0.1:8888/lab
106
+
```
111
107
112
-
<!-->
113
-
To access Ray dashboard, do:
108
+
Once in the the Jupyer envrionment, examples are found in the `codeflare/notebooks` directory in the container image. Documentation forreference use cases can be foundin [Examples](https://codeflare.readthedocs.io/en/latest/).
114
109
115
-
In your browser, go to:
116
-
-->
110
+
To execute any of the notebooks with the Ray cluster running on Code Engine, edit the `ray.init()` line with the following parameters:
117
111
118
-
Once in a Jupyer envrionment, refer to [notebooks](../../notebooks) forexample pipeline. Documentation for reference use cases can be foundin [Examples](https://codeflare.readthedocs.io/en/latest/).
This change will allow pipelines to be auto-scaled on the underlying Ray cluster running on Code Engine (up to 10 workers with the reference deployment). The number of workers and scaling parameters can be adjusted in the `yaml` file.
Copy file name to clipboardExpand all lines: docs/source/getting_started/starting.md
+31-33Lines changed: 31 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,32 +20,32 @@ limitations under the License.
20
20
21
21
## CodeFlare on IBM Cloud Code Engine
22
22
23
-
IBM Cloud Code Engine is a fully managed, serverless platform that runs your containerized workloads, including web apps, microservices, event-driven functions and batch jobs with run-to-completion characteristics.
23
+
IBM Cloud Code Engine is a fully managed, serverless platform that runs your containerized workloads, including web apps, microservices, event-driven functions, and batch jobs with run-to-completion characteristics.
24
24
25
-
CodeFlare Pipelines can use IBM Cloud Code Engine to seamlessly scale pipeline on a serverless backend.
25
+
CodeFlare can use IBM Cloud Code Engine to seamlessly scale pipelines on a serverless backend.
26
26
27
-
The following steps describe how to deploy the examples in [notebooks](./notebooks) on a serverless backend with Code Engine (they expand the steps to run Ray on Code Engine [here](https://www.ibm.com/cloud/blog/ray-on-ibm-cloud-code-engine))
27
+
The following steps describe how to deploy the examples in [notebooks](https://github.com/project-codeflare/codeflare/tree/develop/notebooks) on a serverless backend with Code Engine (they expand the steps to run Ray on Code Engine [here](https://www.ibm.com/cloud/blog/ray-on-ibm-cloud-code-engine))
28
28
29
29
### Install pre-requisities
30
30
31
-
Install the pre-requisites for Code Engine and Ray
31
+
Install the pre-requisites for Code Engine and Ray:
32
32
33
33
1. Get ready with IBM Code Engine:
34
34
35
35
-[Set up your Code Engine CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli)
36
-
-[Create your first Code Engine Project using the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project)
36
+
-[optional][Create your first Code Engine Project using the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project)
37
37
38
38
2.[Set up the Kubernetes CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
39
39
40
-
3. Install Kubernetes (assuming Ray and Python dependcies have been installed with the steps [here](../../README.md).
40
+
3. Install Kubernetes:
41
41
42
42
```shell
43
43
pip install kubernetes
44
44
```
45
45
46
46
### Step 1 - Define your Ray Cluster on Code Engine
47
47
48
-
If not already done, create a project in Code Engine:
48
+
If not already done in the previous step, create a Code Engine project:
Select the Code Engine project and switch the `kubectl` context to the project:
55
55
56
56
```shell
57
-
ibmcloud ce project select-n<your project name>-k
57
+
ibmcloud ce project select-n<your project name> -k
58
58
```
59
59
60
-
Extract the Kubernetes namespace assigned to your project. The namespace can be found in the NAME column intheoutput of the command:
60
+
Extract the Kubernetes namespace assigned to your project. The namespace can be found in the `NAME` column inthe output of the command:
61
61
62
62
```shell
63
63
kubectl get namespace
@@ -69,7 +69,7 @@ Export the namespace:
69
69
export NAMESPACE=<namespace from above>
70
70
```
71
71
72
-
Update With the following command you can download a basic Ray cluster definition and customize itfor your namespace:
72
+
A reference Ray cluster definition can be customizedfor your namespace with the following commands:
73
73
```shell
74
74
cd ./deploy/ibm_cloud_code_engine/
75
75
sed "s/NAMESPACE/$NAMESPACE/" ./example-cluster.yaml.template > ./example-cluster.yaml
@@ -78,50 +78,48 @@ sed "s/NAMESPACE/$NAMESPACE/" ./example-cluster.yaml.template > ./example-cluste
78
78
This reference deployment file will create a Ray cluster with following characteristics:
79
79
80
80
- a cluster named example-cluster with up to 10 workers using the Kubernetes provider pointing to your Code Engine project
81
-
- A head node type with 1 vCPU and 2GiB memory using the CodeFlare image codeflare:nightly
82
-
- A worker node type with 1 vCPU and 2GiB memory using the ray image codeflare:nightly
81
+
- A head node type with 1 vCPU and 2GB of memory using the CodeFlare image `codeflare:latest`
82
+
- A worker node type with 1 vCPU and 2GB memory using the ray image `codeflare:latest`
83
83
- The default startup commands to start Ray within the container and listen to the proper ports
84
84
- The autoscaler upscale speed is set to 2 forquick upscalingin this short and simple demo
85
85
86
86
### Step 2 - Start Ray cluster
87
87
88
-
You can start now the Ray cluster by running
89
-
```
88
+
You can now start the Ray cluster by running:
89
+
90
+
```shell
90
91
ray up example-cluster.yaml
91
92
```
92
93
93
-
This command will create the Ray head node as Kubernetes Pod in your Code Engine project. When you create the Ray cluster for the first time, it can take up to three minutes until the Ray image is downloaded from the Ray repository.
94
+
This command will create the Ray head node as Kubernetes Pod in your Code Engine project. When you create the Ray cluster for the first time, it can take few minutes until the Ray image is downloaded from the container registry.
94
95
95
96
### Step 3 - Run sample Pipeline with Jupyter
96
97
97
-
Edit the sample notebook to connect to a running Ray cluster with the command:
You can now access the Jupyter server by pointing your browser to the following url:
105
+
106
+
```shell
107
+
http://127.0.0.1:8888/lab
109
108
```
110
109
111
-
Set up access to Jupyter notebook:
112
-
< how to obtain the token >
110
+
Once in the the Jupyer envrionment, examples are found in the `codeflare/notebooks` directory in the container image. Documentation forreference use cases can be foundin [Examples](https://codeflare.readthedocs.io/en/latest/).
113
111
114
-
<!-->
115
-
To access Ray dashboard, do:
112
+
To execute any of the notebooks with the Ray cluster running on Code Engine, edit the `ray.init()` line with the following parameters:
Once in a Jupyer envrionment, refer to [notebooks](../../notebooks) forexample pipeline. Documentation for reference use cases can be foundin[Examples](https://codeflare.readthedocs.io/en/latest/).
118
+
This change will allow pipelines to be auto-scaled on the underlying Ray cluster running on Code Engine (up to 10 workers with the reference deployment). The number of workers and scaling parameters can be adjustedinthe `yaml` file.
121
119
122
120
## CodeFlare on OpenShift Container Platform (OCP)
123
121
124
-
A few installation deployment targets are provided below.
122
+
A few installation deployment targets are provided below:
125
123
126
124
- [Ray Cluster Using Operator on Openshift](#Openshift-Ray-Cluster-Operator)
Once in a Jupyer envrionment, refer to [notebooks](../../notebooks) forexample pipeline. Documentation for reference use cases can be foundin [Examples](https://codeflare.readthedocs.io/en/latest/).
277
+
Once in a Jupyer envrionment, refer to [notebooks](https://github.com/project-codeflare/codeflare/tree/develop/notebooks) forexample pipelines. Documentation for reference use cases can be foundin [Examples](https://codeflare.readthedocs.io/en/latest/).
0 commit comments