Skip to content

Commit

Permalink
Remove latest tag and update env image URL to GHCR (#267)
Browse files Browse the repository at this point in the history
* Remove latest tag.
Update environments images URL to point to GHCR.

Signed-off-by: Md Soharab Ansari <[email protected]>

* Resolve review comment

Signed-off-by: Md Soharab Ansari <[email protected]>

---------

Signed-off-by: Md Soharab Ansari <[email protected]>
  • Loading branch information
soharab-ic authored Sep 3, 2024
1 parent 4233b47 commit 348bc7e
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 44 deletions.
2 changes: 1 addition & 1 deletion content/en/blog/demystifying-fission-pool-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ You can control the default pool size based on your needs. You can do so by sett
For instance, the below code snippet with create a new Python environment with a poolsize of 1.

```bash
$ fission env create --name python --version **3** --poolsize **1** --image ghcr.io/fission/python-env:latest
$ fission env create --name python --version **3** --poolsize **1** --image ghcr.io/fission/python-env
$ kubectl get pod -l environmentName**=**test
```

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/fission-zapier-webhook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type: Opaque
Create a Python environment
```bash
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder:latest
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder
```

Create a zip archive as sample.zip archive by executing package.sh script
Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/fission_github_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ In the logs below, we can see that Fission Action applied the specs and the envi
```
### STARTED FissionCD 15:16:50Z
Pulling image: gcr.io/github-actions-images/action-runner:latest
Pulling image: gcr.io/github-actions-images/action-runner
latest: Pulling from github-actions-images/action-runner
169185f82c45: Pulling fs layer
0ccde4b6b241: Pulling fs layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ After this create a docker image and push it to your Docker hub repository.
Building the docker image for our custom Python environment. *(Replace the username with your actual username on Docker Hub.)*
``` bash
docker build -t username/python-postgres:latest --build-arg PY_BASE_IMG=3.7-alpine -f Dockerfile .
docker build -t username/python-postgres --build-arg PY_BASE_IMG=3.7-alpine -f Dockerfile .
```
Pushing the docker image to Docker Hub registry:
``` bash
docker push username/python-postgres:latest
docker push username/python-postgres
```
#### Source Package Setup
Expand Down Expand Up @@ -177,7 +177,7 @@ For this voting app, we will create `python environment`, `packages`, `fission f
Creating the Python environment:
``` bash
fission env create --name pythonsrc --image username/python-postgres --builder ghcr.io/fission/python-builder:latest
fission env create --name pythonsrc --image username/python-postgres --builder ghcr.io/fission/python-builder
```
Once the environment is ready, we create two Fission packages for `backend` and `frontend`
Expand Down Expand Up @@ -268,7 +268,7 @@ You can open a terminal and key in the all the following commands at once.
``` yaml
fission spec init
fission env create --name pythonsrc --image python-postgres --builder ghcr.io/fission/python-builder:latest --spec
fission env create --name pythonsrc --image python-postgres --builder ghcr.io/fission/python-builder --spec
fission package create --name backend-pkg --sourcearchive backend.zip --env pythonsrc --buildcmd "./build.sh" --spec
fission fn create --name backend --pkg backend-pkg --entrypoint "backend.main" --spec
fission route create --name backend --method POST --url /castvote --function backend --spec
Expand All @@ -281,7 +281,7 @@ This will create a `specs` folder with specs for each resource that is required
``` bash
fission spec init
fission env create --name pythonsrc --image atulinfracloud/python-postgres --builder ghcr.io/fission/python-builder:latest --spec
fission env create --name pythonsrc --image atulinfracloud/python-postgres --builder ghcr.io/fission/python-builder --spec
fission package create --name backend-pkg --sourcearchive backend.zip --env pythonsrc --buildcmd "./build.sh" --spec
fission fn create --name backend --pkg backend-pkg --entrypoint "backend.main" --spec
fission route create --name backend --method POST --url /castvote --function backend --spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ It should look like this: `RUN apk add --update --no-cache gcc python3-dev build
Building the docker image for our custom Python environment. *(Replace the username with your actual username on Docker Hub.)*

``` dockerfile
docker build -t username/python-opentelemetry:latest --build-arg PY_BASE_IMG=3.7-alpine -f Dockerfile .
docker build -t username/python-opentelemetry --build-arg PY_BASE_IMG=3.7-alpine -f Dockerfile .
```

Pushing the docker image to Docker Hub registry:

``` dockerfile
docker push username/python-opentelemetry:latest
docker push username/python-opentelemetry
```


Expand All @@ -194,7 +194,7 @@ docker push username/python-opentelemetry:latest
Create Fission environment:

```bash
fission env create --name pythonoptel --image username/python-opentelemetry --builder ghcr.io/fission/python-builder:latest
fission env create --name pythonoptel --image username/python-opentelemetry --builder ghcr.io/fission/python-builder
```

Create source package.
Expand Down Expand Up @@ -233,7 +233,7 @@ With this our custom Python environment is ready along with our Fission function

```bash
fission spec init
fission env create --name pythonoptel --image atulinfracloud/python-opentelemetry --builder ghcr.io/fission/python-builder:latest --spec
fission env create --name pythonoptel --image atulinfracloud/python-opentelemetry --builder ghcr.io/fission/python-builder --spec
fission package create --name fissionoptel-pkg --sourcearchive sample.zip --env pythonoptel --buildcmd "./build.sh" --spec
fission fn create --name optel --pkg fissionoptel-pkg --entrypoint "sample.main" --spec
```
Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/serverless-twitter-bot-fission/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Deploy the secret using `kubectl apply -f secrets.yaml`
Create a Python environment

```bash
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder:latest
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder
```

Create a zip archive as sample.zip archive by executing package.sh script
Expand Down
6 changes: 3 additions & 3 deletions content/en/blog/url-shortener-fission-mongo-db/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ For this voting app, we will create `python environment`, `packages`, `fission f
Create a Python environment

```bash
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder:latest
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder
```

Once the environment is ready, we create two Fission packages for `backend` and `frontend`
Expand Down Expand Up @@ -214,7 +214,7 @@ You can open a terminal and key in the all the following commands at once.

``` yaml
fission spec init
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder:latest --spec
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder --spec
fission package create --name frontend-pkg --sourcearchive frontend.zip --env python --buildcmd "./build.sh" --spec
fission package create --name backend-pkg --sourcearchive backend.zip --env python --buildcmd "./build.sh" --spec
fission fn create --name frontend --pkg frontend-pkg --entrypoint "app.main" --spec
Expand All @@ -227,7 +227,7 @@ This will create a `specs` folder with specs for each resource that is required

``` bash
fission spec init
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder:latest --spec
fission environment create --name python --image ghcr.io/fission/python-env --builder ghcr.io/fission/python-builder --spec
fission package create --name frontend-pkg --sourcearchive frontend.zip --env python --buildcmd "./build.sh" --spec
fission package create --name backend-pkg --sourcearchive backend.zip --env python --buildcmd "./build.sh" --spec
fission fn create --name frontend --pkg frontend-pkg --entrypoint "app.main" --spec
Expand Down
4 changes: 2 additions & 2 deletions content/en/blog/websocket-sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fission spec init
```
fission env create \
--name=nodejs \
--image=ghcr.io/fission/node-env:latest \
--image=ghcr.io/fission/node-env \
--spec
```

Expand Down Expand Up @@ -155,7 +155,7 @@ fission httptrigger create \
```
fission env create \
--name=python \
--image=ghcr.io/fission/python-env:latest \
--image=ghcr.io/fission/python-env \
--spec
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $ helm install --namespace $FISSION_NAMESPACE --set enableIstio=true --name isti
Let's first create the environment for nodejs function we want to create:

```bash
$ fission env create --name nodejs --image ghcr.io/fission/node-env:latest
$ fission env create --name nodejs --image ghcr.io/fission/node-env
```

Let's create a simple function with Node.js environment and a simple hello world example below:
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/usage/function/environments.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ For more details on builder and packages, check out examples in [Functions]({{%

```bash
$ fission env create --name python \
--image ghcr.io/fission/python-env:latest \
--builder ghcr.io/fission/python-builder:latest
--image ghcr.io/fission/python-env \
--builder ghcr.io/fission/python-builder
```

## Viewing environment information
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/usage/function/executor.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ When an environment is created, poolmgr creates a pool of generic pods with **de
We may want to adjust the size of pools based on our need (e.g. resource efficiency), for some [historic reason](https://github.com/fission/fission/issues/506) fission now only supports to adjust pool size by giving `--version 3` flag when creating an environment.

```bash
$ fission env create --name python --version 3 --poolsize 1 --image ghcr.io/fission/python-env:latest
$ fission env create --name python --version 3 --poolsize 1 --image ghcr.io/fission/python-env

$ kubectl get pod -l environmentName=test
```
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/usage/function/functions.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ $ chmod +x build.sh
You first need to create an environment with environment image and python-builder image specified:

```bash
$ fission env create --name python --image ghcr.io/fission/python-env:latest \
--builder ghcr.io/fission/python-builder:latest \
$ fission env create --name python --image ghcr.io/fission/python-env \
--builder ghcr.io/fission/python-builder \
--mincpu 40 --maxcpu 80 \
--minmemory 64 --maxmemory 128 \
--poolsize 2
Expand Down
8 changes: 4 additions & 4 deletions content/en/docs/usage/function/package.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ weight: 35
Before you create a package, you need to create an environment with an associated builder image:

```bash
$ fission env create --name pythonsrc --image ghcr.io/fission/python-env:latest \
--builder ghcr.io/fission/python-builder:latest \
$ fission env create --name pythonsrc --image ghcr.io/fission/python-env \
--builder ghcr.io/fission/python-builder \
--mincpu 40 --maxcpu 80 \
--minmemory 64 --maxmemory 128 \
--poolsize 2
Expand Down Expand Up @@ -124,8 +124,8 @@ b: {c: 3, d: 4}
Before you create a package you need to create an environment with the builder image:

```bash
$ fission env create --name pythondeploy --image ghcr.io/fission/python-env:latest \
--builder ghcr.io/fission/python-builder:latest \
$ fission env create --name pythondeploy --image ghcr.io/fission/python-env \
--builder ghcr.io/fission/python-builder \
--mincpu 40 --maxcpu 80 \
--minmemory 64 --maxmemory 128 \
--poolsize 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ All the files required are present [here](https://github.com/fission/keda-connec
Steps for deploying producer function:

```sh
docker build . -t producer:latest
kind load docker-image producer:latest --name kind
docker build . -t producer
kind load docker-image producer --name kind
kubectl apply -f deployment.yaml //replicas is set to 0 when deployed
```

Expand Down Expand Up @@ -167,7 +167,7 @@ spec:
app: nats-pub
spec:
containers:
- image: producer:latest
- image: producer
imagePullPolicy: Never
name: producer
```
Expand Down
18 changes: 5 additions & 13 deletions content/en/environments/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,11 @@ <h5><label class="d-block" for="filter-lang">Filter by language</label></h5>
document.getElementById("filter-lang").innerHTML = languageOptions.join(' ');

function getBadge(imageName) {
if (imageName.includes("node") || imageName.includes("python") || imageName.includes("go") || imageName.includes("binary")) {
return `<h4 class="d-inline-block mx-1 my-0">
<a href="https://github.com/fission/environments/pkgs/container/${imageName}" class="badge badge-light text-wrap" target="_blank">
${imageName}
</a>
</h4>`
} else {
return `<h4 class="d-inline-block mx-1 my-0">
<a href="https://hub.docker.com/r/fission/${imageName}" class="badge badge-light text-wrap" target="_blank">
${imageName}
</a>
</h4>`
}
return `<h4 class="d-inline-block mx-1 my-0">
<a href="https://github.com/fission/environments/pkgs/container/${imageName}" class="badge badge-light text-wrap" target="_blank">
${imageName}
</a>
</h4>`
}

function updateEnvItems() {
Expand Down

0 comments on commit 348bc7e

Please sign in to comment.