Hi @JJ-Fullmer ! That was Chefs Kiss beautifully done. That method is much easier than accessing the db directly and it solves everything I was hoping to achieve. Everything is working as its supposed to and I set it up to run on cronjobs to export and import the imageDefinitions nightly. Hopefully this improves the ability for companies to have various fog servers around their offices without requiring a VPN to sync images. Thanks as well @george1421 and @Sebastian-Roth!
Best posts made by typotony
-
RE: Copy Cloud Storage of /images to Remote Servers Globally
Latest posts made by typotony
-
Delete/Remove fog images via API
Hi Fog Team,
Is it possible to delete image definitions through the fog api? My issue is that I can remote into the fog server on another site but since I don’t have access to the gui I can’t delete the image. This is mainly for remote administration of these things and to have a clean and updated image repository.
Being able to create a script for a weekly/monhtly purge of images is great as well. I understand that this won’t remove the image dir from /images and thats okay but I am hoping to delete it from the menu, if possible.
Any information is great. Thanks again.
-
RE: Host registration error.
@george1421 Thanks for responding. I’ll go ahead and create a new thread. Thank you!
-
RE: Host registration error.
@mbuteyn Hey there, running into this problem myself with Dells. So you installed the realtek drivers for the specific usb-c NIC you’re using? Which bzimge are you using as well? I have March 5, 2023
5.15.93
AMD/Intel 64 Bit and 32 bit but no luck. -
RE: Copy Cloud Storage of /images to Remote Servers Globally
Hi @JJ-Fullmer ! That was Chefs Kiss beautifully done. That method is much easier than accessing the db directly and it solves everything I was hoping to achieve. Everything is working as its supposed to and I set it up to run on cronjobs to export and import the imageDefinitions nightly. Hopefully this improves the ability for companies to have various fog servers around their offices without requiring a VPN to sync images. Thanks as well @george1421 and @Sebastian-Roth!
-
RE: Copy Cloud Storage of /images to Remote Servers Globally
@JJ-Fullmer Wow that is awesome! I just tested it myself and am running into the problem with the initial setup.
I was able to get pwsh installed on Ubuntu and it seems to be working properly. I have installed and imported the FogApi module.
My configuration is below. I am running into an positional parameter problem when using ‘Set-FogServer Settings’.
import-module FogApi Set-FogServerSettings -fogApiToken 'mytoken' -fogUserToken 'mytoken' fog-server 'http://192.168.150.25'; function Export-FogImageDefinitions { [cmdletBinding()] param ( $exportPath = "\home\mydir\" ) $images = Get-FogImages; $images | Foreach-object { $name = $_.name; $_ | ConvertTo-Json | Out-File -encoding oem "$exportPath\$name.json"; } }
PS /home/me> Get-InstalledModule -Name FogApi
Version Name Repository Description
2302.5.15 FogApi
The error i’m seeing.
| Set-FogServerSettings -fogApiToken 'NmFiMDI4YzAwMmQ3MGUzYTQ3NWEzMDgwN …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| A positional parameter cannot be found that accepts argument ‘fog-server’. -
RE: Copy Cloud Storage of /images to Remote Servers Globally
@george1421 Thank you for that. It does make sense and I think its pretty logical as well.
So to be clear, creating this banded sort of dbs together shouldn’t cause issues if I were to export and import the images table from mysql server to server since each server has its unique block of IDs that it should be using when creating an image.
I’ll have to test this out but that sounds like the gist of it.
-
RE: Copy Cloud Storage of /images to Remote Servers Globally
@george1421 Thank you for the feedback. Ideally, yes, we would like them to create their own images and sync it back up to cloud storage as well so all of the images from each office are available to each other (things like, keyboard differences, language, etc).
But yes, maybe having one server create all of the images might be the way to go.
-
RE: Copy Cloud Storage of /images to Remote Servers Globally
@Sebastian-Roth Hey, thanks for responding so quickly. Yes, the script pulls the images from the cloud AWS S3 bucket into /images everynight and skips images that have already exists.
The import option sounds like it could work. Would I be exporting a csv/db from the root server? So to summarize it sounds like this would be the optimal workflow.
On the root server
- Export mysql to csv/db
- Place file into dir that will be uploaded to cloud storage
On satellite servers
- Cronjob pulls images nightly from cloud storage
- have cronjob to check if sql dump exists in /images dir and then import it, which should update the image definitions within Fog.
Does that sound right?
-
RE: Copy Cloud Storage of /images to Remote Servers Globally
We have pretty non-technical people in other offices and would like them to not have to do the csv importing/exporting themselves. A small task but a task they wouldn’t do themselves. I appreciate the response.