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
This script creates two file, one containing the images necessary to run ryax, and the helm package required for the installation. Additionnaly, you need to copy the two following file for your aigap installation:
Ryax gets Action definitions from Git repositories. To inject Ryax default actions you can **use a locally accessible Git server** where you can clone https://gitlab.com/ryax-tech/workflows/default-actions.git
82
82
83
-
> Other Ryax actions that might interest you depending on your use case are available in https://gitlab.com/ryax-tech/workflows
84
-
{.is-info}
83
+
!!! info
84
+
Other Ryax actions that might interest you depending on your use case are available in https://gitlab.com/ryax-tech/workflows
85
85
86
-
If you don't have a git server accessible withing the airgap installation, you can directly copy the repository into the ryax-repository pod with `kubectl cp`.
86
+
**If you have a git server accessible withing the airgap installation, you can directly go to following section.**
87
+
88
+
If you don't have a git server, you can directly copy the repository into the ryax-repository pod with `kubectl cp`.
87
89
88
90
```bash
89
91
# Find the name of the ryax-repository pod
90
-
$ kubectl -n ryaxns get pod | grep repository
91
-
ryax-repository-97c5554db-jzhdp
92
-
93
-
# Create an archive for the repogit (assuming the repo containing the actions is names default-actions)
94
-
tar cvf default-actions.tar default-actions
92
+
REPOSITORY_POD=$(kubectl -n ryaxns get pod -l ryax.tech/resource-name=repository -o jsonpath='{.items[0].metadata.name}')
# Use kubectl exec to untar the copied repository inside the pod
97
+
# Use kubectl exec to check the content of the copied repository inside the pod
98
+
kubectl exec -ti -n ryaxns ${REPOSITORY_POD} -- ls /tmp/default-actions
100
99
```
101
100
102
-
<!--
103
-
I (adfaure) tested without success:
101
+
Now in the web UI Library, create a new repository with this URL: `file:///tmp/default-action`. You can run a scan and see the available actions.
102
+
103
+
### Build Actions
104
+
105
+
In order to build Ryax actions, the Ryax Action Builder requires an access to software packages inside you airgapped environment.
106
+
Depending on the action type you use you need to configure package servers and/or import packages in the Builder
107
+
108
+
You can configure the build using environement variables in the Builder: All variables prefixed by `RYAX_BUILD_ENV_` are exposed during the build phase.
109
+
110
+
!!! warning
111
+
The support of action build in airgapped is in **TECHNOLOGICAL PREVIEW**.
112
+
Only the `python3` action type is supported for now.
113
+
You can follow the futur developement here: https://gitlab.com/groups/ryax-tech/ryax/-/epics/33
114
+
115
+
116
+
#### Python packages
117
+
118
+
To support python packages, the builder need to access to a Pypi compatible server.
119
+
If don't have one in your environment, here is examples of tools that you can install :
120
+
121
+
-[pypiserver](https://github.com/pypiserver/pypiserver) minimal pypi server
122
+
-[Morgan](https://github.com/ido50/morgan) open source offline repo
123
+
-[Nexus](https://www.sonatype.com/products/sonatype-nexus-repository) a popular proprietary tool to host packages
104
124
105
-
**Only if you do not have a local Git server** you can inject the actions repository directly into the Ryax Repository service. For example, you import the default action git repository in your `/home/example/myrepos` on the hosting node of your Ryax installation and expose it with a `hostPath` in the `ryax-repository` service using these options in the helm values:
125
+
To use your internal Pypi server, you need to configure the following env variable in the Ryax action builder.
126
+
In the Helm chart add the extra env in the `action-builder` section (Change with your server host name):
106
127
```yaml
107
-
repository:
108
-
extraVolumes:
109
-
- name: repos
110
-
hostPath:
111
-
path: /home/example/myrepos
112
-
type: DirectoryOrCreate
113
-
extraVolumeMounts:
114
-
- mountPath: /data/repos
115
-
name: repos
128
+
action-builder:
129
+
extraEnv:
130
+
- name: RYAX_BUILD_ENV_UV_INDEX_URL
131
+
value: http://mypipy-server.example.com
132
+
- name: RYAX_BUILD_ENV_UV_TRUSTED_HOST
133
+
value: mypipy-server.example.com
134
+
- name: RYAX_EXTRA_NIX_ARGS
135
+
value: --no-net
116
136
```
117
-
-->
118
137
119
-
Now in the web UI Library, create a new repository with this URL: `file:///tmp/default-action`. You can run a scan and see the available actions.
138
+
### Nix packages
120
139
121
-
### Build Actions
140
+
To have access to Nix packages inside you airgapped environment you can either use an internal package binary cache or import packages directly in the Builder
122
141
123
-
In order to build Ryax actions, the Ryax Action Builder requires an access to external mirror for Python packages and Nix packages.
142
+
#### Using a binary cache:
124
143
125
-
Pypi mirror:
144
+
Install a Nix Binary cache, for example:
126
145
127
-
-[Morgan](https://github.com/ido50/morgan) open source offline
128
-
-[Nexus](https://www.sonatype.com/products/sonatype-nexus-repository) a popular proprietary tool to host packages
129
-
Nixpkgs mirror:
130
146
- [nix serve](https://github.com/edolstra/nix-serve) a basic nix binary cache server
131
-
-[Attic](https://github.com/zhaofengli/attic) more advanced
147
+
- [Attic](https://github.com/zhaofengli/attic) more advanced with access rights and storage optimisation
148
+
149
+
Then configure the Builder to use it as a substituer (Change with server host name):
If you need extra packages for actions that define `spec.dependencies` in the `ryax_metadata.yaml` create a bundle and import it using the same process:
0 commit comments