Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Commit 58608c1

Browse files
committed
refactor: Remove ng suffix as this is now main
1 parent 932ccfe commit 58608c1

34 files changed

+257
-259
lines changed

.github/workflows/docker.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ jobs:
3030
file: ./Dockerfile
3131
platforms: linux/amd64,linux/arm64/v8
3232
push: true
33-
tags: pojntfx/pojde-ng:latest
33+
tags: pojntfx/pojde:latest
3434
build-args: |
35-
POJDE_NG_OPENRC=false
35+
POJDE_OPENRC=false
3636
build-openrc:
3737
runs-on: ubuntu-latest
3838

@@ -56,6 +56,6 @@ jobs:
5656
file: ./Dockerfile
5757
platforms: linux/amd64,linux/arm64/v8
5858
push: true
59-
tags: pojntfx/pojde-ng:latest-openrc
59+
tags: pojntfx/pojde:latest-openrc
6060
build-args: |
61-
POJDE_NG_OPENRC=true
61+
POJDE_OPENRC=true

Dockerfile

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
FROM debian:10
22

33
# Choose init system
4-
ARG POJDE_NG_OPENRC='false'
5-
ENV POJDE_NG_OPENRC ${POJDE_NG_OPENRC}
4+
ARG POJDE_OPENRC='false'
5+
ENV POJDE_OPENRC ${POJDE_OPENRC}
66

77
# Disable interactive prompts
88
ENV DEBIAN_FRONTEND noninteractive
99

1010
# Setup environment
11-
RUN mkdir -p /opt/pojde-ng/build
12-
WORKDIR /opt/pojde-ng/build
11+
RUN mkdir -p /opt/pojde/build
12+
WORKDIR /opt/pojde/build
1313

1414
# Run build scripts
1515
COPY build/repositories.sh .
@@ -51,23 +51,23 @@ RUN ./webwormhole.sh
5151
COPY build/clean.sh .
5252
RUN ./clean.sh
5353

54-
# Add `pojdectl-ng`
54+
# Add `pojdectl`
5555
COPY bin/* /usr/bin/
5656

5757
# Clean up
58-
RUN rm -rf /opt/pojde-ng/build
58+
RUN rm -rf /opt/pojde/build
5959

6060
# Create preferences & CA directories
61-
RUN mkdir -p /opt/pojde-ng/preferences
62-
RUN mkdir -p /opt/pojde-ng/ca
61+
RUN mkdir -p /opt/pojde/preferences
62+
RUN mkdir -p /opt/pojde/ca
6363

6464
# Add configuration scripts
65-
RUN mkdir -p /opt/pojde-ng/configuration
66-
COPY configuration/* /opt/pojde-ng/configuration/
65+
RUN mkdir -p /opt/pojde/configuration
66+
COPY configuration/* /opt/pojde/configuration/
6767

6868
# Add module scripts
69-
RUN mkdir -p /opt/pojde-ng/modules
70-
COPY modules/* /opt/pojde-ng/modules/
69+
RUN mkdir -p /opt/pojde/modules
70+
COPY modules/* /opt/pojde/modules/
7171

7272
# Go back to home dir
7373
WORKDIR /root

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ pre:
99
chmod +x ./modules/*.sh
1010

1111
build: pre
12-
docker build --build-arg POJDE_NG_OPENRC=false -t pojntfx/pojde-ng:latest .
12+
docker build --build-arg POJDE_OPENRC=false -t pojntfx/pojde:latest .
1313

1414
build-openrc: pre
15-
docker build --build-arg POJDE_NG_OPENRC=true -t pojntfx/pojde-ng:latest-openrc .
15+
docker build --build-arg POJDE_OPENRC=true -t pojntfx/pojde:latest-openrc .
1616

1717
link: pre
18-
sudo ln -sf "$(shell pwd)/bin/pojdectl-ng" /usr/local/bin/pojdectl-ng
18+
sudo ln -sf "$(shell pwd)/bin/pojdectl" /usr/local/bin/pojdectl
1919

2020
install:
21-
sudo install bin/pojdectl-ng /usr/local/bin
21+
sudo install bin/pojdectl /usr/local/bin
2222

2323
uninstall:
2424
sudo rm /usr/local/bin/pojdectl

README.md

+22-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# pojde Next Generation (pojde-ng)
1+
# pojde
22

3-
[![Docker CI](https://github.com/pojntfx/pojde-ng/actions/workflows/docker.yaml/badge.svg)](https://github.com/pojntfx/pojde-ng/actions/workflows/docker.yaml)
3+
[![Docker CI](https://github.com/pojntfx/pojde/actions/workflows/docker.yaml/badge.svg)](https://github.com/pojntfx/pojde/actions/workflows/docker.yaml)
44
![Chrome Support](https://img.shields.io/badge/Chrome-Latest%20version-%234285F4?logo=google-chrome)
55
![Firefox Support](https://img.shields.io/badge/Firefox-Latest%20version-%23FF7139?logo=firefox-browser)
66
![Safari Support](https://img.shields.io/badge/Safari-Latest%20version-%23000000?logo=safari)
@@ -9,9 +9,7 @@
99

1010
## Overview
1111

12-
🚧 This project is still a work-in-progress! 🚧
13-
14-
pojde Next Generation is a distributed multi-tenant development environment with web access to all components.
12+
pojde is a distributed multi-tenant development environment with web access to all components.
1513

1614
It strives to be ...
1715

@@ -21,45 +19,45 @@ It strives to be ...
2119
- **Portable:** Runs on both Intel/AMD and ARM and requires Docker as the only dependency
2220
- **Lean**: Built on projects like [code-server](https://github.com/cdr/code-server) and [JupyterLab](http://jupyterlab.io/)
2321

24-
With pojde Next Generation, you can **develop from any device with a browser!**
22+
With pojde, you can **develop from any device with a browser!**
2523

2624
## Installation
2725

28-
To install `pojdectl-ng`, the management tool for pojde Next Generation, paste the following into your terminal:
26+
To install `pojdectl`, the management tool for pojde, paste the following into your terminal:
2927

3028
```shell
31-
curl https://raw.githubusercontent.com/pojntfx/pojde-ng/main/bin/pojdectl-ng | bash -s -- upgrade-pojdectl-ng
29+
curl https://raw.githubusercontent.com/pojntfx/pojde/main/bin/pojdectl | bash -s -- upgrade-pojdectl
3230
```
3331

3432
Works on Linux, macOS and Windows (WSL2).
3533

3634
## Usage
3735

38-
pojde Next Generation supports running many isolated instances on a host, where the host can be your local machine, a cloud server or even a Raspberry Pi. Before you continue to the next step, please [install Docker](https://docs.docker.com/get-docker/) on the host that you wish to run the instance on.
36+
pojde supports running many isolated instances on a host, where the host can be your local machine, a cloud server or even a Raspberry Pi. Before you continue to the next step, please [install Docker](https://docs.docker.com/get-docker/) on the host that you wish to run the instance on.
3937

40-
To create your first instance, use `pojdectl-ng apply`:
38+
To create your first instance, use `pojdectl apply`:
4139

4240
```shell
43-
$ pojdectl-ng apply my-first-instance 5000 # Append `-n root@your-ip:ssh-port` to create the instance on a remote host instead
41+
$ pojdectl apply my-first-instance 5000 # Append `-n root@your-ip:ssh-port` to create the instance on a remote host instead
4442
```
4543

46-
Now follow the instructions. `pojdectl-ng apply` will ask you to download the CA certificate to your system, which you should do when creating the first instance; future instances will share this certificate. To trust the CA certificate, follow the videos we've created for you:
44+
Now follow the instructions. `pojdectl apply` will ask you to download the CA certificate to your system, which you should do when creating the first instance; future instances will share this certificate. To trust the CA certificate, follow the videos we've created for you:
4745

4846
- [Trusting self-signed SSL certificates (Chrome on Linux)](https://www.youtube.com/watch?v=byFN8vH2SaM)
4947
- [Trusting self-signed SSL certificates (Chrome on macOS)](https://www.youtube.com/watch?v=_PJc7RcMnw8)
5048
- [Trusting self signed SSL certificates (Chrome on Windows)](https://www.youtube.com/watch?v=gyQ9IIxE3vc)
5149

5250
Note that you'll have to **select the CA certificate you've downloaded in the step before**, not download the certificate as described in the videos.
5351

54-
Once you've done so, list your instances with `pojdectl-ng list`:
52+
Once you've done so, list your instances with `pojdectl list`:
5553

5654
```shell
57-
$ pojdectl-ng list # Append `-n root@your-ip:ssh-port` to list the instances on a remote host instead
55+
$ pojdectl list # Append `-n root@your-ip:ssh-port` to list the instances on a remote host instead
5856
NAME STATUS PORTS
5957
my-first-instance running 5000-5005
6058
```
6159

62-
As you can see, our first instance (`my-first-instance`) is running and has exposed ports **5000** through **5005**. This port range has been selected when we ran `pojdectl-ng apply` above. You can now access the services (replace `localhost` with your remote host's IP or domain if you deployed to a remote host):
60+
As you can see, our first instance (`my-first-instance`) is running and has exposed ports **5000** through **5005**. This port range has been selected when we ran `pojdectl apply` above. You can now access the services (replace `localhost` with your remote host's IP or domain if you deployed to a remote host):
6361

6462
| Icon | Service | Address | Description |
6563
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ----------------------- | -------------------------------------- |
@@ -69,19 +67,19 @@ As you can see, our first instance (`my-first-instance`) is running and has expo
6967
| <img src="https://raw.githubusercontent.com/novnc/noVNC/master/app/images/icons/novnc-192x192.png" width="25"> | [noVNC](https://novnc.com/info.html) | https://localhost:5003/ | Graphical access from the browser |
7068
| <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/jupyter/jupyter-original.svg" width="25"> | [JupyterLab](http://jupyterlab.io/) | https://localhost:5004/ | An interactive development environment |
7169

72-
Additionally, there is a SSH server running on port `5005` which you can use to forward ports with `pojdectl-ng forward`:
70+
Additionally, there is a SSH server running on port `5005` which you can use to forward ports with `pojdectl forward`:
7371

7472
```shell
75-
$ pojdectl-ng forward my-first-instance 4200:1234 4201:1235 # Append `-n root@your-ip:ssh-port` to also forward from the remote host to the local host
73+
$ pojdectl forward my-first-instance 4200:1234 4201:1235 # Append `-n root@your-ip:ssh-port` to also forward from the remote host to the local host
7674
```
7775

7876
This, for example, forwards port `1234` in the instance to port `4200` on the local host and port `1235` to port `4201`.
7977

80-
**🚀 That's it!** We hope you enjoy using pojde Next Generation.
78+
**🚀 That's it!** We hope you enjoy using pojde.
8179

8280
## Modules
8381

84-
pojde Next Generation is based on a minimal base image; additional functionality can be added by enabling any of the following modules when running `pojdectl-ng apply`:
82+
pojde is based on a minimal base image; additional functionality can be added by enabling any of the following modules when running `pojdectl apply`:
8583

8684
## Language Modules
8785

@@ -118,8 +116,8 @@ pojde Next Generation is based on a minimal base image; additional functionality
118116
## Reference
119117

120118
```shell
121-
$ pojdectl-ng --help
122-
pojdectl-ng is the management tool for pojde Next Generation.
119+
$ pojdectl --help
120+
pojdectl is the management tool for pojde.
123121
Global Flags:
124122
[-n]ode <user@host:port> Remote host to execute on.
125123
If not specified, execute locally.
@@ -151,14 +149,14 @@ enter <name> Get a shell in an instance.
151149
forward <name> [local:remote...] Forward port(s) from an instance.
152150

153151
Miscellaneous Commands:
154-
upgrade-pojdectl-ng Upgrade this tool.
152+
upgrade-pojdectl Upgrade this tool.
155153
reset-ca [-f]orce Reset the CA.
156154

157-
For more information, please visit https://github.com/pojntfx/pojde-ng#Usage.
155+
For more information, please visit https://github.com/pojntfx/pojde#Usage.
158156
```
159157

160158
## License
161159

162-
pojde Next Generation (c) 2021 Felicitas Pojtinger and contributors
160+
pojde (c) 2021 Felicitas Pojtinger and contributors
163161

164162
SPDX-License-Identifier: AGPL-3.0

bin/pojdectl-ng renamed to bin/pojdectl

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash
22

33
# Prefix for all objects in the Docker daemon.
4-
DOCKER_PREFIX=pojde-ng-
4+
DOCKER_PREFIX=pojde-
55
# Name of the CA
66
CA_VOLUME_NAME=${DOCKER_PREFIX}ca
77
# Scripts to run to apply/refresh instances. Order matters. "parameters" is run before all others.
88
SCRIPTS="user apt code-server ttyd novnc jupyter-lab nginx docker ssh git modules webwormhole clean"
99
# Prefix to display before destructive operations.
1010
CONFIRMATION_PREFIX="This could lead to data loss. Really"
1111

12-
# Shows pojdectl-ng usage information.
12+
# Shows pojdectl usage information.
1313
print_help() {
1414
case "$1" in
1515
"-h" | "--help")
@@ -20,7 +20,7 @@ print_help() {
2020
;;
2121
esac
2222

23-
echo "pojdectl-ng is the management tool for pojde Next Generation.
23+
echo "pojdectl is the management tool for pojde.
2424
Global Flags:
2525
[-n]ode <user@host:port> Remote host to execute on.
2626
If not specified, execute locally.
@@ -52,17 +52,17 @@ enter <name> Get a shell in an instance.
5252
forward <name> [local:remote...] Forward port(s) from an instance.
5353
5454
Miscellaneous Commands:
55-
upgrade-pojdectl-ng Upgrade this tool.
55+
upgrade-pojdectl Upgrade this tool.
5656
reset-ca [-f]orce Reset the CA.
5757
58-
For more information, please visit https://github.com/pojntfx/pojde-ng#Usage."
58+
For more information, please visit https://github.com/pojntfx/pojde#Usage."
5959

6060
exit 0
6161
}
6262

6363
# Asks the user to re-apply their instance.
6464
print_please_reapply() {
65-
echo 'Please run "pojdectl-ng apply" again to re-initialize.'
65+
echo 'Please run "pojdectl apply" again to re-initialize.'
6666
}
6767

6868
# Gets a summary of the exposed ports for an instance.
@@ -127,10 +127,10 @@ if [ "${run_remotely}" = "true" ]; then
127127
exit 1
128128
fi
129129

130-
# Install pojdectl-ng if not already installed on remote host
131-
is_already_installed=$(if [ -x "$(ssh -p ${port} ${host} command -v pojdectl-ng)" ]; then echo true; else echo false; fi)
130+
# Install pojdectl if not already installed on remote host
131+
is_already_installed=$(if [ -x "$(ssh -p ${port} ${host} command -v pojdectl)" ]; then echo true; else echo false; fi)
132132
if [ "${is_already_installed}" = "false" ]; then
133-
scp -P ${port} $(which pojdectl-ng) ${host}:/usr/local/bin
133+
scp -P ${port} $(which pojdectl) ${host}:/usr/local/bin
134134
fi
135135

136136
# Strip the `-n` flag from the remote command
@@ -139,7 +139,7 @@ if [ "${run_remotely}" = "true" ]; then
139139
# The `forward` commadn requires advanced steps here
140140
if [ "$1" != "forward" ]; then
141141
# Run the command remotely
142-
ssh -tt -p ${port} ${host} pojdectl-ng $remote_command
142+
ssh -tt -p ${port} ${host} pojdectl $remote_command
143143

144144
# Don't continue with local execution
145145
exit 0
@@ -210,11 +210,11 @@ apply)
210210
# Adjust Docker arguments if host system uses OpenRC
211211
docker_flags=""
212212
docker_args=""
213-
docker_image="pojntfx/pojde-ng:latest"
213+
docker_image="pojntfx/pojde:latest"
214214
if [ ! -n "$(which systemctl)" ]; then
215-
docker_flags="-e POJDE_NG_OPENRC=true"
215+
docker_flags="-e POJDE_OPENRC=true"
216216
docker_args="/sbin/openrc-init"
217-
docker_image="pojntfx/pojde-ng:latest-openrc"
217+
docker_image="pojntfx/pojde:latest-openrc"
218218
fi
219219

220220
# Pull the latest image
@@ -250,8 +250,8 @@ apply)
250250
--tmpfs /run:exec \
251251
--tmpfs /run/lock:exec \
252252
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
253-
-v ${DOCKER_PREFIX}${name}-preferences:/opt/pojde-ng/preferences:z \
254-
-v ${CA_VOLUME_NAME}:/opt/pojde-ng/ca:z \
253+
-v ${DOCKER_PREFIX}${name}-preferences:/opt/pojde/preferences:z \
254+
-v ${CA_VOLUME_NAME}:/opt/pojde/ca:z \
255255
-v ${DOCKER_PREFIX}${name}-home-root:/root:z \
256256
-v ${DOCKER_PREFIX}${name}-home-user:/home:z \
257257
-v ${DOCKER_PREFIX}${name}-apt-cache:/var/cache/apt/archives:z \
@@ -266,7 +266,7 @@ apply)
266266
fi
267267

268268
# Ask for parameters
269-
docker exec -it ${docker_flags} ${DOCKER_PREFIX}${name} bash -c "/opt/pojde-ng/configuration/parameters.sh"
269+
docker exec -it ${docker_flags} ${DOCKER_PREFIX}${name} bash -c "/opt/pojde/configuration/parameters.sh"
270270

271271
# Exit if aborted
272272
if [ "$?" != "0" ]; then
@@ -277,7 +277,7 @@ apply)
277277

278278
# Run the upgrade hooks of the scripts
279279
for script in $SCRIPTS; do
280-
docker exec -it ${docker_flags} ${DOCKER_PREFIX}${name} bash -c ". /opt/pojde-ng/configuration/${script}.sh && upgrade"
280+
docker exec -it ${docker_flags} ${DOCKER_PREFIX}${name} bash -c ". /opt/pojde/configuration/${script}.sh && upgrade"
281281
done
282282
;;
283283

@@ -362,7 +362,7 @@ remove)
362362
fi
363363
if [[ $REPLY =~ ^[Yy]$ ]]; then
364364
for script in $SCRIPTS; do
365-
docker exec -it ${docker_flags} ${DOCKER_PREFIX}${name} bash -c ". /opt/pojde-ng/configuration/${script}.sh && refresh"
365+
docker exec -it ${docker_flags} ${DOCKER_PREFIX}${name} bash -c ". /opt/pojde/configuration/${script}.sh && refresh"
366366
done
367367

368368
print_please_reapply
@@ -497,7 +497,7 @@ forward)
497497
done
498498

499499
# Script to run remotely and locally
500-
exec_line_remote="pojdectl-ng ${remote_command}"
500+
exec_line_remote="pojdectl ${remote_command}"
501501
exec_line_local="ssh -f -p ${port} ${host} ${ports_to_forward}"
502502

503503
# Forward from the container on the remote host to the remote host
@@ -561,11 +561,11 @@ forward)
561561
;;
562562

563563
# Upgrade this tool.
564-
upgrade-pojdectl-ng)
564+
upgrade-pojdectl)
565565
# Fetch the latest version from GitHub
566-
sudo curl -L -o /usr/local/bin/pojdectl-ng https://raw.githubusercontent.com/pojntfx/pojde-ng/main/bin/pojdectl-ng
566+
sudo curl -L -o /usr/local/bin/pojdectl https://raw.githubusercontent.com/pojntfx/pojde/main/bin/pojdectl
567567
# Make it executable
568-
sudo chmod +x /usr/local/bin/pojdectl-ng
568+
sudo chmod +x /usr/local/bin/pojdectl
569569
;;
570570

571571
# Reset the CA.
@@ -579,7 +579,7 @@ reset-ca)
579579
if [[ $REPLY =~ ^[Yy]$ ]]; then
580580
docker volume rm ${CA_VOLUME_NAME}
581581

582-
echo "Please run \"pojdectl-ng apply\" again for all instances to re-initialize; if you don't do so, you'll loose secure access to them."
582+
echo "Please run \"pojdectl apply\" again for all instances to re-initialize; if you don't do so, you'll loose secure access to them."
583583
fi
584584
;;
585585

build/clean.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# Remove configuration scripts
4-
rm -rf /opt/pojde-ng/configuration
4+
rm -rf /opt/pojde/configuration

build/cockpit.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Exit if not on systemd
4-
if [ "${POJDE_NG_OPENRC}" = 'true' ]; then exit 0; fi
4+
if [ "${POJDE_OPENRC}" = 'true' ]; then exit 0; fi
55

66
# Install Cockpit
77
apt install -y cockpit

0 commit comments

Comments
 (0)