Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create installer #37

Merged
merged 17 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,37 @@ jobs:
.\build_samples.bat
--no-tests

- name: Download cloudfuse for Windows
if: ${{ Contains(matrix.os, 'windows') }}
shell: pwsh
run: |
$download_url = Invoke-RestMethod -Uri "https://api.github.com/repos/Seagate/cloudfuse/releases/latest" | Select-Object -ExpandProperty assets | Where-Object { $_.name -like "*windows_amd64.exe" } | Select-Object -ExpandProperty browser_download_url
$file_name = $download_url.Split('/')[-1]
Invoke-WebRequest -Uri $download_url -OutFile $file_name

- name: Download cloudfuse for Linux (no_gui)
if: ${{ Contains(matrix.os, 'ubuntu') }}
run: |
download_url=$(curl -s https://api.github.com/repos/Seagate/cloudfuse/releases/latest | jq -r '.assets[] | select(.name | contains("linux_amd64.deb")) | .browser_download_url')
curl -LO $download_url

- name: Package Artifacts Linux
if: ${{ Contains(matrix.os, 'ubuntu') }}
run: |
mkdir nx-lyve-cloud-plugin-${{ matrix.os }}
mv ../nx-lyve-cloud-plugin-build/cloudfuse_plugin/*.so nx-lyve-cloud-plugin-${{ matrix.os }}/cloudfuse_plugin.so
cp ./setup_fuse_allow_other.sh nx-lyve-cloud-plugin-${{ matrix.os }}/
mv ./install_plugin_linux.sh nx-lyve-cloud-plugin-${{ matrix.os }}/
mv ./cloudfuse*_linux_amd64.deb nx-lyve-cloud-plugin-${{ matrix.os }}/
zip -r nx-lyve-cloud-plugin-${{ matrix.os }}.zip nx-lyve-cloud-plugin-${{ matrix.os }}

- name: Package Artifacts Windows
shell: powershell
if: ${{ Contains(matrix.os, 'windows') }}
run: |
mkdir nx-lyve-cloud-plugin-windows
mv ..\nx-lyve-cloud-plugin-build\cloudfuse_plugin\Release\cloudfuse_plugin.dll nx-lyve-cloud-plugin-windows/cloudfuse_plugin.dll
mv ..\nx-lyve-cloud-plugin-build\cloudfuse_plugin\Release\cloudfuse_plugin.dll nx-lyve-cloud-plugin-windows\cloudfuse_plugin.dll
mv .\install_plugin_windows.bat nx-lyve-cloud-plugin-windows\
mv .\cloudfuse*_windows_amd64.deb nx-lyve-cloud-plugin-windows\
Compress-Archive nx-lyve-cloud-plugin-windows nx-lyve-cloud-plugin-windows.zip

- name: Archive production artifacts from Ubuntu
Expand Down
18 changes: 18 additions & 0 deletions setup_fuse_allow_other.sh → install_plugin_linux.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash

## Copyright © 2024 Seagate Technology LLC and/or its Affiliates
set -e

### Setup Fuse Allow Other
FUSE_CONF="/etc/fuse.conf"

# Check if "user_allow_other" is already in the file
Expand All @@ -17,3 +22,16 @@ else
echo "Added user_allow_other added to $FUSE_CONF"
fi
fi

### Install Cloudfuse
echo "Installing Cloudfuse"
apt-get install libssl-dev
apt-get install ./cloudfuse*.deb

### Install plugin
echo "Installing Cloudfuse plugin"
systemctl restart networkoptix-mediaserver.service
foodprocessor marked this conversation as resolved.
Show resolved Hide resolved
cp cloudfuse_plugin.so /opt/networkoptix-metavms/mediaserver/bin/plugins/
systemctl restart networkoptix-mediaserver.service

echo "Finished installing Cloudfuse plugin"
23 changes: 23 additions & 0 deletions install_plugin_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:: Copyright © 2024 Seagate Technology LLC and/or its Affiliates
@echo off

for %%I in (cloudfuse*.exe) do (
set "installer=%%I"
break
)

REM Check if the installer file exists
if exist "%installer%" (
echo "Installing Cloudfuse"
"%installer%" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
) else (
echo "Installer file not found"
)

echo "Installing plugin"

copy ".\cloudfuse_plugin.dll" "C:\Program Files\Network Optix\Nx Meta\MediaServer\plugins\"

foodprocessor marked this conversation as resolved.
Show resolved Hide resolved
echo "Finished installing Cloudfuse plugin"

pause