Remove build debian in Mac OS and all its dependencies (#2543)

This commit is contained in:
Carlos Alcaide Corvo authored and GitHub committed 2024-11-06 10:19:49 -08:00
1 parent 37482c0b36
commit 186873d9d4
6 files changed
+2 -136

No files matched your search

-9
View File
@@ -51,7 +51,6 @@ List of available project commands. `yarn run <command-name>`
| ------- | ----------- |
| build | Builds the UI for production. |
| build:development | Builds the UI in development mode. |
| build:desktop:debianOnMacOS | Builds debian based linux artifacts on MacOS. |
| lint | Runs all lint commands. |
| lint:fix | Runs all automatic linting fixes. |
| lint:hbs | Lints `hbs` template files. |
@@ -128,14 +127,6 @@ bypass the download of the CLI, which can be useful for pre-release testing. See
[Developing Using Non-Release Versions of
Boundary](#developing-using-non-release-versions-of-boundary) for more details.
To build debian based linux artifacts on MacOS, additional [MacOS tools](https://www.electronforge.io/config/makers/deb) need to be installed before running the following commands from this folder.
```bash
yarn install
yarn build:production # Build assets
yarn build:desktop:debianOnMacOS # Build app
```
#### Environment Variables (PROD)
These environment variables may be used to customized the build.
-6
View File
@@ -35,12 +35,6 @@ const downloadArtifact = (version) => {
archivePlatform.arch = arch;
}
// Set cli artifact to linux-amd64 when building debian artifacts on macOS
if (process.env.BUILD_DEBIAN) {
archivePlatform.name = 'linux';
archivePlatform.arch = 'amd64';
}
console.log(
`Download cli for platform: ${archivePlatform.name} arch: ${archivePlatform.arch}`,
);
+1 -6
View File
@@ -13,12 +13,7 @@ const createConfig = () => {
executableName: 'Boundary',
};
if (process.env.BUILD_DEBIAN) {
config.name = 'boundary-desktop';
config.productName = 'boundary-desktop';
}
if (isLinux() || process.env.BUILD_DEBIAN) config.executableName = 'boundary-desktop';
if (isLinux()) config.executableName = 'boundary-desktop';
if (!config.releaseVersion) config.releaseVersion = '0.0.0';
return config;
@@ -83,12 +83,7 @@ module.exports = {
console.log(`[package] Release version: ${config.releaseVersion}`);
// Check for MacOS signing identity.
// Ignore signing identity warning for debian builds made on MacOS
if (
isMac() &&
!process.env.BOUNDARY_DESKTOP_SIGNING_IDENTITY &&
!process.env.BUILD_DEBIAN
)
if (isMac() && !process.env.BOUNDARY_DESKTOP_SIGNING_IDENTITY)
console.warn(
'[package] WARNING: Could not find signing identity. Proceeding without signing.',
);
-108
View File
@@ -1,108 +0,0 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
=begin
This vagrant script is used to setup Ubuntu in Virtualbox and deploy both the desktop client and cli
in preparation for testing linux support for desktop client.
Install vagrant guest additions plugin: `vagrant plugin install vagrant-vbguest`.
## Setup Desktop
For using locally built debian artifacts:
- Refer to 'Building for Production' section in /boundary-ui/ui/desktop/README to build debian
artifacts on MacOS
## Setup Ubuntu
- Create a ubuntu desktop box using vagrant: `vagrant up --provision-with setup,cli,staged-desktop`.
- Desktop client artifact and cli will be available in `/home/vagrant/Desktop` after logging into ubuntu.
Username/password for login: vagrant/vagrant. Navigate to `/home/vagrant/Desktop` in a terminal app.
- To install desktop app use either `apt` or `dpkg`
- `sudo apt install ./boundary-desktop_1.3.0_linux_amd64.deb`
- `sudo dpkg -i ./boundary-desktop_1.3.0_linux_amd64.deb`
- To launch desktop client from terminal: `boundary-desktop`
- To launch cli: `./boundary dev`
## Provision types
User --provision-with option to setup machine for either cli or development
Setup for testing staged desktop release:
vagrant up --provision-with setup,cli,staged-desktop
Setup for testing artifacts built locally:
vagrant up --provision-with setup,cli
Setup for developing desktop client:
vagrant up --provision-with setup,development
To destroy machine:
vagrant destroy -f
=end
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
# Share desktop artifacts folder
config.vm.synced_folder "../../../out/release", "/vagrant-desktop-app", create: true, owner: "vagrant", group: "vagrant", automount: true
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "4096"
vb.customize ["modifyvm", :id, "--vram", "64"]
end
config.vm.provision "setup", type: "shell", inline: <<-SHELL
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install curl firefox
# Add vagrant to administrator group
sudo usermod -aG sudo vagrant
# Add vagrant to shared folder
sudo usermod -aG vboxsf vagrant
SHELL
# Setup for testing desktop
config.vm.provision "cli", type: "shell", inline: <<-SHELL
# Install ubuntu desktop GUI
# For GNOME desktop:
# sudo apt install gnome-session gnome-terminal
sudo apt-get install -y --no-install-recommends lubuntu-desktop
# Setup boundary cli
sudo apt-get install docker.io -y
sudo groupadd docker
sudo usermod -aG docker vagrant
sudo apt-get install -y unzip
curl https://releases.hashicorp.com/boundary/0.5.0/boundary_0.5.0_linux_amd64.zip -o boundary-cli.zip
unzip -o boundary-cli.zip -d /home/vagrant/Desktop/
# Setup localhost ssh
yes | ssh-keygen -t rsa -N "" -f /home/vagrant/.ssh/id_rsa -C vagrant@ubuntu-focal
cat /home/vagrant/.ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys
sudo chown -R vagrant:vagrant .ssh
# Restart
# sudo shutdown -r now
SHELL
# Setup for developing desktop
config.vm.provision "development", type: "shell", inline: <<-SHELL
# Setup node source
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get remove cmdtest
sudo apt-get install -y npm git chromium-browser
git clone https://github.com/hashicorp/boundary-ui.git /home/vagrant/Desktop/boundary-ui
sudo npm install -g yarn
# Install boundary-ui dependencies
cd /home/vagrant/Desktop/boundary-ui
yarn install
SHELL
config.vm.provision "staged-desktop", type: "shell", inline: <<-SHELL
# Download staged desktop
sudo apt install wget -y
wget -P /home/vagrant/Desktop/ http://hc-releases-boundary-desktop-staging.s3-website-us-east-1.amazonaws.com/boundary-desktop/1.3.0/boundary-desktop_1.3.0_linux_amd64.deb
# Install
sudo apt install /home/vagrant/Desktop/boundary-desktop_1.3.0_linux_amd64.deb
SHELL
config.vm.post_up_message = "Login using username/password: vagrant/vagrant.\nArtifacts: /home/vagrant/Desktop"
end
-1
View File
@@ -16,7 +16,6 @@
"build:development": "ember build",
"prebuild:desktop": "shx rm -rf electron-app/ember-dist electron-app/out && shx cp -r dist/ electron-app/ember-dist/",
"build:desktop": "yarn build:desktop:install && yarn --cwd electron-app make",
"build:desktop:debianOnMacOS": "yarn build:desktop:install && BUILD_DEBIAN=true yarn --cwd electron-app make --platform linux --arch x64",
"build:desktop:install": "yarn install --cwd electron-app",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",