-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
14 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.