Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroYld committed Nov 12, 2024
1 parent 858948c commit 9d2b3fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# Copy balena fleet variables from fleet A to fleet B 📝

# Copy balena fleet variables from fleet A to fleet B 📝
This Bash script allows you to copy environment variables from a balena fleet or device to another.

This Bash script allows you to copy environment variables from one Balena fleet to another.

## Prerequisites🚀
## Prerequisites🚀
1) balena cli : https://github.com/balena-io/balena-cli
2) jq : https://stedolan.github.io/jq/

## Usage 🔥
### To use this script, run the following command:
## Usage 🔥
### Copying envs from fleet A to B
```
./balena-copy.sh <source_fleet_name> <destination_fleet_name>
```
Where ```<source_fleet_name>``` is the name of the fleet where the environment variables will be copied from, and ```<destination_fleet_name>``` is the name of the fleet where the environment variables will be copied to.

This will retrieve the environment variables from ```<source_fleet_name>```, store them in a JSON file, and then add each variable to ```<source_fleet_name>```. Once the script has finished running, you will see a message indicating that the environment variables were successfully copied.

Note: You must be logged in to the Balena CLI with an account that has access to both fleets in order to use this script.

## Upcoming features 🔥
### Copying envs from device A to B
```
./balena-copy-device.sh <source_device_uuid> <destination_device_uuid>
```
Where ```<source_device_uuid``` is the source device uuid, and ```<destination_device_uuid``` is the destination device uuid

1) copy variables to multiple fleets
2) device variable support
3) specifying the service name for the environment variable
> [!NOTE]
> You must be logged in to the Balena CLI with an account that has access to both fleets in order to use this script.
### Licence
developed by Firat YILDIRIM, for an open source contribution for balena cloud
> [!TIP]
> ```--service='my-service'``` can be used to copy specific variables from a single service or several.
Empty file modified balena-copy-device.sh
100644 → 100755
Empty file.

0 comments on commit 9d2b3fe

Please sign in to comment.