Rename resin-supervisor to balena-supervisor

Change-type: minor
Signed-off-by: Kyle Harding <kyle@balena.io>
This commit is contained in:
Kyle Harding 2021-04-29 16:02:52 +00:00
parent 2f9d52cc6a
commit 5faf9d7686
8 changed files with 15 additions and 15 deletions

View File

@ -183,7 +183,7 @@ This will show the output of `journalctl` inside the Docker-in-Docker container.
additional options, for instance, to see the logs from the supervisor service:
```bash
./dindctl logs -fn 100 -u resin-supervisor
./dindctl logs -fn 100 -u balena-supervisor
```
#### Stop the supervisor

View File

@ -118,16 +118,16 @@ function parseOptions {
SUPERVISOR_DIND_MOUNTS="-v ${DIND_DIR}/config/supervisor-image.tar:/usr/src/supervisor-image.tar:ro"
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/config/supervisor.conf:/etc/resin-supervisor/supervisor.conf"
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/config/supervisor.conf:/etc/balena-supervisor/supervisor.conf"
if [ "${MOUNT_DIST}" == "true" ]; then
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/../../dist:/resin-supervisor/dist"
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/../../dist:/balena-supervisor/dist"
fi
if [ "${PRELOADED_IMAGE}" == "true" ]; then
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/apps.json:/mnt/data/apps.json"
fi
if [ "${MOUNT_NODE_MODULES}" == "true" ]; then
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/../../node_modules:/resin-supervisor/node_modules"
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/../../node_modules:/balena-supervisor/node_modules"
fi
if [ "${MOUNT_BACKUP}" == "true" ]; then
SUPERVISOR_DIND_MOUNTS="${SUPERVISOR_DIND_MOUNTS} -v ${DIND_DIR}/backup.tgz:/mnt/data/backup.tgz.mounted"
@ -154,7 +154,7 @@ function buildSupervisorSrc {
function refreshSupervisorSrc {
buildSupervisorSrc
echo "Restarting the supervisor container"
docker exec -ti balena-container-$CONTAINER_NAME systemctl restart resin-supervisor
docker exec -ti balena-container-$CONTAINER_NAME systemctl restart balena-supervisor
}
function runDind {

View File

@ -22,7 +22,7 @@ On older devices (with v4.0.0 <= supervisor version < v7.22.0) the lock is locat
Legacy supervisors (< v4.0.0) have the lock at `/data/resin-updates.lock`. This lock is only supported on devices running balenaOS 1.X.
This old lock has the problem that the supervisor has to clear whenever it starts up to avoid deadlocks. If the user app
has taken the lock before the supervisor starts up, the lock will be cleared and the app can operate under the false
assumption that updates are locked (see [issue #20](https://github.com/resin-io/resin-supervisor/issues/20)). We therefore strongly recommend switching to the new lock location as soon as possible.
assumption that updates are locked (see [issue #20](https://github.com/balena-os/balena-supervisor/issues/20)). We therefore strongly recommend switching to the new lock location as soon as possible.
### Creating the lockfile

View File

@ -5,7 +5,7 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/resin-io/resin-supervisor.git"
"url": "https://github.com/balena-os/balena-supervisor.git"
},
"scripts": {
"start": "./entry.sh",

View File

@ -43,7 +43,7 @@ export const fnSchema = {
async () => {
try {
// FIXME: We should be mounting the following file into the supervisor from the
// start-resin-supervisor script, changed in meta-resin - but until then, hardcode it
// start-balena-supervisor script, changed in meta-resin - but until then, hardcode it
const data = await fs.readFile(
`${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`,
'utf8',
@ -62,7 +62,7 @@ export const fnSchema = {
async () => {
try {
// FIXME: We should be mounting the following file into the supervisor from the
// start-resin-supervisor script, changed in meta-resin - but until then, hardcode it
// start-balena-supervisor script, changed in meta-resin - but until then, hardcode it
const data = await fs.readFile(
`${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`,
'utf8',

View File

@ -158,11 +158,11 @@ async function runSshCommand(address: string, command: string) {
}
export function stopSupervisor(address: string) {
return runSshCommand(address, 'systemctl stop resin-supervisor');
return runSshCommand(address, 'systemctl stop balena-supervisor');
}
export function startSupervisor(address: string) {
return runSshCommand(address, 'systemctl start resin-supervisor');
return runSshCommand(address, 'systemctl start balena-supervisor');
}
export async function replaceSupervisorImage(

View File

@ -127,7 +127,7 @@ describe.skip('LocalModeManager', () => {
},
Image: 'super-image-1',
HostConfig: {
ContainerIDFile: '/resin-data/resin-supervisor/container-id',
ContainerIDFile: '/resin-data/balena-supervisor/container-id',
},
Mounts: [
{

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Adapted from: https://github.com/balena-os/meta-balena/blob/v2.45.0/meta-balena-common/recipes-containers/resin-supervisor/resin-supervisor/start-resin-supervisor
# Adapted from: https://github.com/balena-os/meta-balena/blob/v2.45.0/meta-balena-common/recipes-containers/balena-supervisor/balena-supervisor/start-balena-supervisor
# We still need to include resin-vars on legacy systems
if [ -f /usr/sbin/resin-vars ]; then
@ -92,7 +92,7 @@ runSupervisor() {
-v /var/run/balena-engine.sock:/var/run/balena-engine.sock \
-v "$CONFIG_PATH:/boot/config.json" \
-v /mnt/data/apps.json:/boot/apps.json \
-v /resin-data/resin-supervisor:/data \
-v /resin-data/balena-supervisor:/data \
-v /proc/net/fib_trie:/mnt/fib_trie \
-v /var/log/supervisor-log:/var/log \
-v /:/mnt/root \
@ -112,7 +112,7 @@ runSupervisor() {
if [ -z "$SUPERVISOR_IMAGE_ID" ]; then
# No supervisor image exists on the device, try to pull it
systemctl start update-resin-supervisor
systemctl start update-balena-supervisor
elif [ "$SUPERVISOR_IMAGE_ID" = "$SUPERVISOR_CONTAINER_IMAGE_ID" ] && configIsUnchanged; then
# Supervisor image exists, and the current supervisor container is created from
balena start --attach resin_supervisor