-
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.
DT-125 Rancher Desktop added as a step and Kubernetes disabled (#39)
- Loading branch information
1 parent
38e5302
commit 634aedf
Showing
6 changed files
with
215 additions
and
22 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
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 +1 @@ | ||
0.1.16 | ||
0.1.17 |
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
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
134 changes: 134 additions & 0 deletions
134
lib/core/rancher/io.rancherdesktop.profile.defaults.plist
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 |
---|---|---|
@@ -0,0 +1,134 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>WSL</key> | ||
<dict> | ||
<key>integrations</key> | ||
<dict/> | ||
</dict> | ||
<key>application</key> | ||
<dict> | ||
<key>adminAccess</key> | ||
<true/> | ||
<key>autoStart</key> | ||
<true/> | ||
<key>debug</key> | ||
<false/> | ||
<key>hideNotificationIcon</key> | ||
<false/> | ||
<key>pathManagementStrategy</key> | ||
<string>manual</string> | ||
<key>startInBackground</key> | ||
<true/> | ||
<key>telemetry</key> | ||
<dict> | ||
<key>enabled</key> | ||
<true/> | ||
</dict> | ||
<key>updater</key> | ||
<dict> | ||
<key>enabled</key> | ||
<true/> | ||
</dict> | ||
<key>window</key> | ||
<dict> | ||
<key>quitOnClose</key> | ||
<false/> | ||
</dict> | ||
</dict> | ||
<key>containerEngine</key> | ||
<dict> | ||
<key>allowedImages</key> | ||
<dict> | ||
<key>enabled</key> | ||
<false/> | ||
<key>patterns</key> | ||
<array/> | ||
</dict> | ||
<key>name</key> | ||
<string>moby</string> | ||
</dict> | ||
<key>diagnostics</key> | ||
<dict> | ||
<key>mutedChecks</key> | ||
<dict/> | ||
<key>showMuted</key> | ||
<false/> | ||
</dict> | ||
<key>experimental</key> | ||
<dict> | ||
<key>virtualMachine</key> | ||
<dict> | ||
<key>mount</key> | ||
<dict> | ||
<key>9p</key> | ||
<dict> | ||
<key>cacheMode</key> | ||
<string>mmap</string> | ||
<key>msizeInKB</key> | ||
<integer>128</integer> | ||
<key>protocolVersion</key> | ||
<string>9p2000.L</string> | ||
<key>securityModel</key> | ||
<string>none</string> | ||
</dict> | ||
<key>type</key> | ||
<string>reverse-sshfs</string> | ||
</dict> | ||
<key>networkingTunnel</key> | ||
<false/> | ||
<key>socketVMNet</key> | ||
<false/> | ||
<key>type</key> | ||
<string>qemu</string> | ||
<key>useRosetta</key> | ||
<false/> | ||
</dict> | ||
</dict> | ||
<key>images</key> | ||
<dict> | ||
<key>namespace</key> | ||
<string>k8s.io</string> | ||
<key>showAll</key> | ||
<true/> | ||
</dict> | ||
<key>kubernetes</key> | ||
<dict> | ||
<key>enabled</key> | ||
<false/> | ||
<key>ingress</key> | ||
<dict> | ||
<key>localhostOnly</key> | ||
<false/> | ||
</dict> | ||
<key>options</key> | ||
<dict> | ||
<key>flannel</key> | ||
<true/> | ||
<key>traefik</key> | ||
<true/> | ||
</dict> | ||
<key>port</key> | ||
<integer>6443</integer> | ||
<key>version</key> | ||
<string>1.25.7</string> | ||
</dict> | ||
<key>portForwarding</key> | ||
<dict> | ||
<key>includeKubernetesServices</key> | ||
<false/> | ||
</dict> | ||
<key>version</key> | ||
<integer>6</integer> | ||
<key>virtualMachine</key> | ||
<dict> | ||
<key>hostResolver</key> | ||
<true/> | ||
<key>memoryInGB</key> | ||
<integer>6</integer> | ||
<key>numberCPUs</key> | ||
<integer>2</integer> | ||
</dict> | ||
</dict> | ||
</plist> |
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
# IH_CORE_DIR will be set to the directory containing the bin and lib directories. | ||
|
||
function ih::setup::core.rancher::help() { | ||
echo 'Install Rancher Desktop as an alternative to Docker Desktop' | ||
} | ||
|
||
# Check if the step has been installed and return 0 if it has. | ||
# Otherwise return 1. | ||
function ih::setup::core.rancher::test() { | ||
|
||
|
||
# Check for PLIST FILE | ||
PLISTFILE="$HOME/Library/Preferences/io.rancherdesktop.profile.defaults.plist" | ||
if [ -f "$PLISTFILE" ]; then | ||
return 0 | ||
fi | ||
|
||
|
||
ih::log::debug "Rancher Desktop is not available" | ||
return 1 | ||
} | ||
|
||
function ih::setup::core.rancher::deps() { | ||
echo "core.shell" | ||
} | ||
|
||
|
||
function ih::setup::core.rancher::install() { | ||
local THIS_DIR="$IH_CORE_LIB_DIR/core/rancher" | ||
|
||
cp "${THIS_DIR}/io.rancherdesktop.profile.defaults.plist" "$HOME/Library/Preferences/io.rancherdesktop.profile.defaults.plist" | ||
|
||
|
||
|
||
CASKSUCCEEDED=1 | ||
# Installation and configuration of Rancher Desktop | ||
for _ in 1 2 3; do | ||
|
||
# Detect Rosetta | ||
if [[ $(sysctl -n sysctl.proc_translated) -eq 1 ]]; then | ||
# Rosetta Active | ||
arch -arm64 -c brew reinstall ih-rancher | ||
else | ||
brew reinstall ih-rancher | ||
fi | ||
|
||
CASKSUCCEEDED=$? | ||
if [ $CASKSUCCEEDED -eq 0 ]; then | ||
break | ||
fi | ||
done | ||
|
||
rm -rf ~/.rd | ||
$(/Applications/Rancher\ Desktop.app/Contents/Resources/resources/darwin/bin/rdctl start) | ||
# Check for docker binary in /usr/local/bin | ||
# Check if /usr/local/bin/docker exists | ||
DOCKERBIN=/usr/local/bin/docker | ||
DOCKERCOMPOSEBIN=/usr/local/bin/docker-compose | ||
if [ ! -f "$DOCKERBIN" ]; then | ||
|
||
echo "In order to continue with Rancher configuration and be able to use this engine, some IDEs require the creation of symlinks for remote Python interpreters" | ||
echo "Your password is required for the creation of symlink mentioned above" | ||
sudo ln -s $HOME/.rd/bin/docker /usr/local/bin/docker | ||
if [ ! -f "$DOCKERCOMPOSEBIN" ]; then | ||
sudo ln -s $HOME/.rd/bin/docker-compose /usr/local/bin/docker-compose | ||
fi | ||
fi | ||
|
||
echo "Rancher Desktop has been installed successfully" | ||
} |