mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
Saving my work so I can switch back to main for a few minutes of troubleshooting
This commit is contained in:
parent
ae46f32187
commit
30413e7f70
22
Earthfile
22
Earthfile
@ -206,21 +206,23 @@ unit-tests-linux:
|
|||||||
|
|
||||||
# Package
|
# Package
|
||||||
package-linux-amd64-deb:
|
package-linux-amd64-deb:
|
||||||
|
ARG IS_NIGHTLY="false"
|
||||||
FROM +build-linux-amd64
|
FROM +build-linux-amd64
|
||||||
#################################
|
#################################
|
||||||
### DEBIAN DPKG .DEB FILES
|
### DEBIAN DPKG .DEB FILES
|
||||||
#################################
|
#################################
|
||||||
COPY --dir package /veilid
|
COPY --dir package /veilid
|
||||||
# veilid-server
|
# veilid-server
|
||||||
RUN /veilid/package/debian/earthly_make_veilid_server_deb.sh amd64 x86_64-unknown-linux-gnu true
|
RUN /veilid/package/debian/earthly_make_veilid_server_deb.sh amd64 x86_64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
||||||
# veilid-cli
|
# veilid-cli
|
||||||
RUN /veilid/package/debian/earthly_make_veilid_cli_deb.sh amd64 x86_64-unknown-linux-gnu true
|
RUN /veilid/package/debian/earthly_make_veilid_cli_deb.sh amd64 x86_64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
# save artifacts
|
# save artifacts
|
||||||
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
||||||
|
|
||||||
package-linux-amd64-rpm:
|
package-linux-amd64-rpm:
|
||||||
FROM --platform amd64 rockylinux:8
|
ARG IS_NIGHTLY="false"
|
||||||
|
FROM --platform amd64 rockylinux:9
|
||||||
RUN yum install -y createrepo rpm-build rpm-sign yum-utils rpmdevtools
|
RUN yum install -y createrepo rpm-build rpm-sign yum-utils rpmdevtools
|
||||||
RUN rpmdev-setuptree
|
RUN rpmdev-setuptree
|
||||||
#################################
|
#################################
|
||||||
@ -231,28 +233,30 @@ package-linux-amd64-rpm:
|
|||||||
COPY +build-linux-amd64/x86_64-unknown-linux-gnu /veilid/target/x86_64-unknown-linux-gnu
|
COPY +build-linux-amd64/x86_64-unknown-linux-gnu /veilid/target/x86_64-unknown-linux-gnu
|
||||||
RUN mkdir -p /rpm-work-dir/veilid-server
|
RUN mkdir -p /rpm-work-dir/veilid-server
|
||||||
# veilid-server
|
# veilid-server
|
||||||
RUN veilid/package/rpm/veilid-server/earthly_make_veilid_server_rpm.sh x86_64 x86_64-unknown-linux-gnu true
|
RUN veilid/package/rpm/veilid-server/earthly_make_veilid_server_rpm.sh x86_64 x86_64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
#SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/x86_64/*.rpm AS LOCAL ./target/packages/
|
#SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/x86_64/*.rpm AS LOCAL ./target/packages/
|
||||||
# veilid-cli
|
# veilid-cli
|
||||||
RUN veilid/package/rpm/veilid-cli/earthly_make_veilid_cli_rpm.sh x86_64 x86_64-unknown-linux-gnu true
|
RUN veilid/package/rpm/veilid-cli/earthly_make_veilid_cli_rpm.sh x86_64 x86_64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
# save artifacts
|
# save artifacts
|
||||||
SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/x86_64/*.rpm AS LOCAL ./target/packages/
|
SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/x86_64/*.rpm AS LOCAL ./target/packages/
|
||||||
|
|
||||||
package-linux-arm64-deb:
|
package-linux-arm64-deb:
|
||||||
|
ARG IS_NIGHTLY="false"
|
||||||
FROM +build-linux-arm64
|
FROM +build-linux-arm64
|
||||||
#################################
|
#################################
|
||||||
### DEBIAN DPKG .DEB FILES
|
### DEBIAN DPKG .DEB FILES
|
||||||
#################################
|
#################################
|
||||||
COPY --dir package /veilid
|
COPY --dir package /veilid
|
||||||
# veilid-server
|
# veilid-server
|
||||||
RUN /veilid/package/debian/earthly_make_veilid_server_deb.sh arm64 aarch64-unknown-linux-gnu true
|
RUN /veilid/package/debian/earthly_make_veilid_server_deb.sh arm64 aarch64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
||||||
# veilid-cli
|
# veilid-cli
|
||||||
RUN /veilid/package/debian/earthly_make_veilid_cli_deb.sh arm64 aarch64-unknown-linux-gnu true
|
RUN /veilid/package/debian/earthly_make_veilid_cli_deb.sh arm64 aarch64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
# save artifacts
|
# save artifacts
|
||||||
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
SAVE ARTIFACT --keep-ts /dpkg/out/*.deb AS LOCAL ./target/packages/
|
||||||
|
|
||||||
package-linux-arm64-rpm:
|
package-linux-arm64-rpm:
|
||||||
|
ARG IS_NIGHTLY="false"
|
||||||
FROM --platform arm64 rockylinux:8
|
FROM --platform arm64 rockylinux:8
|
||||||
RUN yum install -y createrepo rpm-build rpm-sign yum-utils rpmdevtools
|
RUN yum install -y createrepo rpm-build rpm-sign yum-utils rpmdevtools
|
||||||
RUN rpmdev-setuptree
|
RUN rpmdev-setuptree
|
||||||
@ -264,10 +268,10 @@ package-linux-arm64-rpm:
|
|||||||
COPY +build-linux-arm64/aarch64-unknown-linux-gnu /veilid/target/aarch64-unknown-linux-gnu
|
COPY +build-linux-arm64/aarch64-unknown-linux-gnu /veilid/target/aarch64-unknown-linux-gnu
|
||||||
RUN mkdir -p /rpm-work-dir/veilid-server
|
RUN mkdir -p /rpm-work-dir/veilid-server
|
||||||
# veilid-server
|
# veilid-server
|
||||||
RUN veilid/package/rpm/veilid-server/earthly_make_veilid_server_rpm.sh aarch64 aarch64-unknown-linux-gnu --IS_NIGHTLY=$IS_NIGHTLY
|
RUN veilid/package/rpm/veilid-server/earthly_make_veilid_server_rpm.sh aarch64 aarch64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
#SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/aarch64/*.rpm AS LOCAL ./target/packages/
|
#SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/aarch64/*.rpm AS LOCAL ./target/packages/
|
||||||
# veilid-cli
|
# veilid-cli
|
||||||
RUN veilid/package/rpm/veilid-cli/earthly_make_veilid_cli_rpm.sh aarch64 aarch64-unknown-linux-gnu --IS_NIGHTLY=$IS_NIGHTLY
|
RUN veilid/package/rpm/veilid-cli/earthly_make_veilid_cli_rpm.sh aarch64 aarch64-unknown-linux-gnu "$IS_NIGHTLY"
|
||||||
# save artifacts
|
# save artifacts
|
||||||
SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/aarch64/*.rpm AS LOCAL ./target/packages/
|
SAVE ARTIFACT --keep-ts /root/rpmbuild/RPMS/aarch64/*.rpm AS LOCAL ./target/packages/
|
||||||
|
|
||||||
|
18
INSTALL.md
18
INSTALL.md
@ -27,17 +27,31 @@ dpkg --print-architecture
|
|||||||
**Step 3**: Add Veilid to your list of available software.<br />
|
**Step 3**: Add Veilid to your list of available software.<br />
|
||||||
*Explanation*: Use the result of your command in **Step 2** and run **one** of the following:
|
*Explanation*: Use the result of your command in **Step 2** and run **one** of the following:
|
||||||
|
|
||||||
- For **AMD64** based systems run this command:
|
- For *STABLE* releases
|
||||||
|
- **AMD64** based systems run this command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
- For **ARM64** based systems run this command:
|
- **ARM64** based systems run this command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
|
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt stable main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
|
||||||
```
|
```
|
||||||
|
- For *NIGHTLY* (bleeding edge) releases
|
||||||
|
- **AMD64** based systems run this command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt nightly main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
- **ARM64** based systems run this command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/veilid-packages-keyring.gpg] https://packages.veilid.net/apt nightly main" | sudo tee /etc/apt/sources.list.d/veilid.list 1>/dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
*Explanation*:
|
*Explanation*:
|
||||||
Each of the above commands will create a new file called `veilid.list` in the `/etc/apt/sources.list.d/`. This file contains instructions that tell the operating system where to download Veilid.
|
Each of the above commands will create a new file called `veilid.list` in the `/etc/apt/sources.list.d/`. This file contains instructions that tell the operating system where to download Veilid.
|
||||||
|
@ -10,8 +10,16 @@ rm -rf /dpkg
|
|||||||
mkdir -p /dpkg/out
|
mkdir -p /dpkg/out
|
||||||
|
|
||||||
# veilid-cli dpkg control
|
# veilid-cli dpkg control
|
||||||
cp -rf /veilid/package/debian/veilid-cli /dpkg
|
cp -rf /veilid/package/debian/veilid-cli /dpkg# Appropriatly name the package for STABLE or NIGHTLY release
|
||||||
/veilid/package/replace_variable.sh /dpkg/veilid-cli/DEBIAN/control CARGO_VERSION $CARGO_VERSION
|
if [ "$3" = "true" ]
|
||||||
|
then
|
||||||
|
/veilid/package/replace_variable.sh /dpkg/veilid-cli/DEBIAN/control CARGO_VERSION $BUILD_DATE
|
||||||
|
elif [ "$3" = "false" ]
|
||||||
|
then
|
||||||
|
/veilid/package/replace_variable.sh /dpkg/veilid-cli/DEBIAN/control CARGO_VERSION $CARGO_VERSION
|
||||||
|
else
|
||||||
|
echo $3 "is not a valid state to determine if the build is STABLE or NIGHTLY"
|
||||||
|
fi
|
||||||
/veilid/package/replace_variable.sh /dpkg/veilid-cli/DEBIAN/control ARCH $ARCH
|
/veilid/package/replace_variable.sh /dpkg/veilid-cli/DEBIAN/control ARCH $ARCH
|
||||||
# veilid-cli executable
|
# veilid-cli executable
|
||||||
mkdir -p /dpkg/veilid-cli/usr/bin
|
mkdir -p /dpkg/veilid-cli/usr/bin
|
||||||
|
@ -11,6 +11,16 @@ mkdir -p /dpkg/out
|
|||||||
|
|
||||||
# veilid-server dpkg control
|
# veilid-server dpkg control
|
||||||
cp -rf /veilid/package/debian/veilid-server /dpkg
|
cp -rf /veilid/package/debian/veilid-server /dpkg
|
||||||
|
# Appropriatly name the package for STABLE or NIGHTLY release
|
||||||
|
# if [ "$3" = "true" ]
|
||||||
|
# then
|
||||||
|
# /veilid/package/replace_variable.sh /dpkg/veilid-server/DEBIAN/control CARGO_VERSION $BUILD_DATE
|
||||||
|
# elif [ "$3" = "false" ]
|
||||||
|
# then
|
||||||
|
# /veilid/package/replace_variable.sh /dpkg/veilid-server/DEBIAN/control CARGO_VERSION $CARGO_VERSION
|
||||||
|
# else
|
||||||
|
# echo $3 "is not a valid state to determine if the build is STABLE or NIGHTLY"
|
||||||
|
# fi
|
||||||
/veilid/package/replace_variable.sh /dpkg/veilid-server/DEBIAN/control CARGO_VERSION $CARGO_VERSION
|
/veilid/package/replace_variable.sh /dpkg/veilid-server/DEBIAN/control CARGO_VERSION $CARGO_VERSION
|
||||||
/veilid/package/replace_variable.sh /dpkg/veilid-server/DEBIAN/control ARCH $ARCH
|
/veilid/package/replace_variable.sh /dpkg/veilid-server/DEBIAN/control ARCH $ARCH
|
||||||
# veilid-server configuration
|
# veilid-server configuration
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# Clean and reset the workspaces
|
# Clean and reset the workspaces
|
||||||
echo "Setting up the workspace"
|
echo "Setting up the workspace"
|
||||||
# Rsync active repo to local workspace
|
# Rsync active repo to local workspace
|
||||||
rsync --archive gitlab-runner@10.116.0.3:/srv $HOME
|
rsync --archive gitlab-runner@10.116.0.3:/srv/ $HOME/srv/
|
||||||
# Ensure repo directory structure exists
|
# Ensure repo directory structure exists
|
||||||
mkdir -p $HOME/srv/{gpg,rpm/{nightly/x86_64,nightly/x86_64,stable/x86_64,stable/x86_64},apt/{dists/{stable/main/{binary-amd64,binary-arm64},nightly/main/{binary-amd64,binary-arm64}},pool/{stable/main,nightly/main}}}
|
mkdir -p $HOME/srv/{gpg,rpm/{nightly/x86_64,nightly/x86_64,stable/x86_64,stable/x86_64},apt/{dists/{stable/main/{binary-amd64,binary-arm64},nightly/main/{binary-amd64,binary-arm64}},pool/{stable/main,nightly/main}}}
|
||||||
# Delete previous versions of packages
|
# Delete previous versions of packages
|
||||||
@ -20,7 +20,7 @@ gpg --armor --export admin@veilid.org > $HOME/srv/gpg/veilid-packages-key.public
|
|||||||
|
|
||||||
# Copy .deb files into the workspace and generate repo files
|
# Copy .deb files into the workspace and generate repo files
|
||||||
echo "Starting deb process"
|
echo "Starting deb process"
|
||||||
cd ~
|
cd $HOME
|
||||||
tar -xf amd64-debs.tar
|
tar -xf amd64-debs.tar
|
||||||
tar -xf arm64-debs.tar
|
tar -xf arm64-debs.tar
|
||||||
cp *.deb /home/gitlab-runner/srv/apt/pool/nightly/main
|
cp *.deb /home/gitlab-runner/srv/apt/pool/nightly/main
|
||||||
@ -31,11 +31,11 @@ dpkg-scanpackages --arch arm64 pool/nightly > dists/nightly/main/binary-arm64/Pa
|
|||||||
cat dists/nightly/main/binary-amd64/Packages | gzip -9 > dists/nightly/main/binary-amd64/Packages.gz
|
cat dists/nightly/main/binary-amd64/Packages | gzip -9 > dists/nightly/main/binary-amd64/Packages.gz
|
||||||
cat dists/nightly/main/binary-arm64/Packages | gzip -9 > dists/nightly/main/binary-arm64/Packages.gz
|
cat dists/nightly/main/binary-arm64/Packages | gzip -9 > dists/nightly/main/binary-arm64/Packages.gz
|
||||||
echo "Creating Release file"
|
echo "Creating Release file"
|
||||||
cd /home/gitlab-runner/srv/apt/dists/nightly
|
cd $HOME/srv/apt/dists/nightly
|
||||||
~/generate-nightly-release.sh > Release
|
bash $HOME/generate-nightly-release.sh > Release
|
||||||
echo "Signing Release file and creating InRelease"
|
echo "Signing Release file and creating InRelease"
|
||||||
cat /home/gitlab-runner/srv/apt/dists/nightly/Release | gpg --default-key admin@veilid.org -abs > /home/gitlab-runner/srv/apt/dists/nightly/Release.gpg
|
cat $HOME/srv/apt/dists/nightly/Release | gpg --default-key admin@veilid.org -abs > /home/gitlab-runner/srv/apt/dists/nightly/Release.gpg
|
||||||
cat /home/gitlab-runner/srv/apt/dists/nightly/Release | gpg --default-key admin@veilid.org -abs --clearsign > /home/gitlab-runner/srv/apt/dists/nightly/InRelease
|
cat $HOME/srv/apt/dists/nightly/Release | gpg --default-key admin@veilid.org -abs --clearsign > /home/gitlab-runner/srv/apt/dists/nightly/InRelease
|
||||||
|
|
||||||
# Copy .rpm files into the workspace and generate repo files
|
# Copy .rpm files into the workspace and generate repo files
|
||||||
echo "Starting rpm process"
|
echo "Starting rpm process"
|
||||||
@ -48,7 +48,7 @@ cp -R $GNUPGHOME $HOME/rpm-build-container/mount/keystore
|
|||||||
echo "Executing container actions"
|
echo "Executing container actions"
|
||||||
docker run --rm -d -it --name rpm-repo-builder --mount type=bind,source=$HOME/rpm-build-container/mount,target=/mount rpm-repo-builder-img:v8
|
docker run --rm -d -it --name rpm-repo-builder --mount type=bind,source=$HOME/rpm-build-container/mount,target=/mount rpm-repo-builder-img:v8
|
||||||
sleep 2
|
sleep 2
|
||||||
cp -R $HOME/rpm-build-container/mount/repo/nightly $HOME/srv/rpm/nightly
|
cp -R $HOME/rpm-build-container/mount/repo/nightly/* $HOME/srv/rpm/nightly
|
||||||
cd $HOME/srv/rpm/nightly/x86_64
|
cd $HOME/srv/rpm/nightly/x86_64
|
||||||
echo "Signing the rpm repository"
|
echo "Signing the rpm repository"
|
||||||
gpg --default-key admin@veilid.org --detach-sign --armor $HOME/srv/rpm/nightly/x86_64/repodata/repomd.xml
|
gpg --default-key admin@veilid.org --detach-sign --armor $HOME/srv/rpm/nightly/x86_64/repodata/repomd.xml
|
||||||
@ -63,7 +63,7 @@ gpgkey=https://packages.veilid.net/gpg/veilid-packages-key.public" > $HOME/srv/r
|
|||||||
# Tar the repo data and transfer to the repo server
|
# Tar the repo data and transfer to the repo server
|
||||||
echo "Moving the repo scaffold to the repo server"
|
echo "Moving the repo scaffold to the repo server"
|
||||||
cd $HOME
|
cd $HOME
|
||||||
rsync --archive $HOME/srv gitlab-runner@10.116.0.3:/srv
|
rsync --archive $HOME/srv/ gitlab-runner@10.116.0.3:/srv/
|
||||||
# tar -cf $HOME/repo.tar srv
|
# tar -cf $HOME/repo.tar srv
|
||||||
# scp -i $HOME/.ssh/id_ed25519 $HOME/repo.tar gitlab-runner@10.116.0.3:~
|
# scp -i $HOME/.ssh/id_ed25519 $HOME/repo.tar gitlab-runner@10.116.0.3:~
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user