mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 10:13:58 +00:00
prole.installer wip
This commit is contained in:
parent
1f4b394e94
commit
053d907666
@ -1,79 +0,0 @@
|
||||
# Prole Service Dependencies Installer
|
||||
|
||||
A desktop application for installing, deploying, and validating Prole services.
|
||||
|
||||
## Features
|
||||
|
||||
### 1. Install Screen
|
||||
- Check installation status of required dependencies:
|
||||
- Docker
|
||||
- Homebrew
|
||||
- k3d
|
||||
- kubectl
|
||||
- Helm
|
||||
- krew
|
||||
- cmctl
|
||||
- Download links to each project's homepage
|
||||
- Generate installer script (`install_dependencies.sh`) with all installation commands
|
||||
|
||||
### 2. Deploy Screen
|
||||
- Single "Build and Deploy" button that:
|
||||
- Checks Docker is running
|
||||
- Creates or restarts k3d `prole-service-cluster`
|
||||
- Builds the local `prole-db` Docker image
|
||||
- Tags the image for the registry
|
||||
- Pushes the image to the registry
|
||||
- Imports the image to the k3d cluster
|
||||
- Real-time progress tracking with visual indicators (pending, running, completed, error)
|
||||
- Green checkmarks for completed steps
|
||||
|
||||
### 3. Validate Screen
|
||||
- Displays `kubectl cnpg status prole-db` output
|
||||
- Shows k3d cluster list status
|
||||
- Auto-refreshes every 10 seconds (can be toggled)
|
||||
- Manual refresh button
|
||||
- Link to Prometheus (http://localhost:9090)
|
||||
|
||||
## Usage
|
||||
|
||||
### Running the Installer
|
||||
|
||||
```bash
|
||||
python3 install.py
|
||||
```
|
||||
|
||||
Or make it executable and run directly:
|
||||
|
||||
```bash
|
||||
chmod +x install.py
|
||||
./install.py
|
||||
```
|
||||
|
||||
### Requirements
|
||||
|
||||
- Python 3.6+
|
||||
- tkinter (usually included with Python on macOS/Linux)
|
||||
- macOS (for Homebrew installation)
|
||||
|
||||
### Installation Steps
|
||||
|
||||
1. **Install Dependencies**: Use the Install screen to check and install required dependencies
|
||||
2. **Deploy Services**: Use the Deploy screen to build and deploy Prole services
|
||||
3. **Validate**: Use the Validate screen to monitor the deployment status
|
||||
|
||||
## Notes
|
||||
|
||||
- The installer requires Docker Desktop to be running for deployment
|
||||
- The k3d cluster name is `prole-service-cluster` as specified in README.md
|
||||
- The Docker image version is `prole-db:17.5-027`
|
||||
- The registry is configured as `k8s-prole-org-registry:k8s.prole.org:5000`
|
||||
|
||||
## Apple Silicon Support
|
||||
|
||||
The installer automatically detects if running on Apple Silicon (ARM64) and:
|
||||
- Sets `--platform linux/amd64` flag for Docker builds
|
||||
- Ensures mssql Docker images are built for AMD64 platform (required for MSSQL Server)
|
||||
- Ensures prole-db images are built for AMD64 platform for compatibility
|
||||
|
||||
This ensures compatibility with services that require AMD64 architecture, such as MSSQL Server.
|
||||
|
||||
@ -53,13 +53,13 @@ module "cs-prod-prod-us-west1-gateway" {
|
||||
}
|
||||
]
|
||||
}
|
||||
router_asn =
|
||||
router_asn = 64514
|
||||
keepalive_interval = 20
|
||||
tunnels = {
|
||||
tnl0 = {
|
||||
bgp_peer = {
|
||||
address = cidrhost("${local.bgp_ips.prod-prod-us-west1-gateway-tnl0}/30", 2)
|
||||
asn =
|
||||
asn = 65001
|
||||
}
|
||||
bgp_session_name = "prod-us-west1-gateway-tnl0"
|
||||
bgp_peer_options = {
|
||||
@ -73,7 +73,7 @@ module "cs-prod-prod-us-west1-gateway" {
|
||||
tnl1 = {
|
||||
bgp_peer = {
|
||||
address = cidrhost("${local.bgp_ips.prod-prod-us-west1-gateway-tnl1}/30", 2)
|
||||
asn =
|
||||
asn = 65001
|
||||
}
|
||||
bgp_session_name = "prod-us-west1-gateway-tnl1"
|
||||
bgp_peer_options = {
|
||||
|
||||
BIN
img/proleLogo.png
Normal file
BIN
img/proleLogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
BIN
img/proleLogoBlueprint.png
Normal file
BIN
img/proleLogoBlueprint.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 MiB |
BIN
img/proleLogoSepia.png
Normal file
BIN
img/proleLogoSepia.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 MiB |
62
install.py
62
install.py
@ -45,6 +45,11 @@ class ProleInstaller:
|
||||
def __init__(self, root):
|
||||
self.root = root
|
||||
self.root.title("Prole Installer")
|
||||
# Best-effort: set app identity (menu title / dock icon) early
|
||||
try:
|
||||
self._set_app_identity()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Center window on screen
|
||||
window_width = 1000
|
||||
@ -183,6 +188,62 @@ class ProleInstaller:
|
||||
self.show_page(0)
|
||||
self.update_footer()
|
||||
|
||||
# ---------------- App identity (title, Dock icon) ----------------
|
||||
def _set_app_identity(self):
|
||||
"""Set the app name shown by Tk and attempt to set the macOS Dock icon.
|
||||
|
||||
Notes:
|
||||
- tk appname affects Tk's internal application name and may improve
|
||||
display in some OS integrations. On macOS, fully changing the menu bar
|
||||
app name from "Python" typically requires running as a bundled app
|
||||
with CFBundleName set, but we still set the Tk appname here.
|
||||
- For the Dock icon on macOS, we try to use the ProleStatus.app icns
|
||||
(capital P icon). If PyObjC (AppKit) isn't available, we fall back to
|
||||
setting a Tk window icon from a PNG/GIF in img/.
|
||||
"""
|
||||
# Set Tk application name
|
||||
try:
|
||||
self.root.tk.call('tk', 'appname', 'Prole Installer')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# macOS Dock icon via AppKit (preferred)
|
||||
if platform.system() == 'Darwin':
|
||||
icns_candidates = [
|
||||
PROJECT_ROOT / 'proleStatus' / 'dist' / 'ProleStatus.app' / 'Contents' / 'Resources' / 'AppIcon.icns',
|
||||
PROJECT_ROOT / 'proleStatus' / 'dist' / 'ProleStatus.app' / 'Contents' / 'Resources' / 'ProleStatus.icns',
|
||||
]
|
||||
icns_path = next((p for p in icns_candidates if p.exists()), None)
|
||||
if icns_path is not None:
|
||||
try:
|
||||
# Use PyObjC if available
|
||||
from AppKit import NSApplication, NSImage
|
||||
img = NSImage.alloc().initWithContentsOfFile_(str(icns_path))
|
||||
if img is not None:
|
||||
NSApplication.sharedApplication().setApplicationIconImage_(img)
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Fallback: Tk icon from image assets (PNG/GIF)
|
||||
img_candidates = [
|
||||
PROJECT_ROOT / 'img' / 'prole-type.gif',
|
||||
PROJECT_ROOT / 'img' / 'prole-type.png',
|
||||
PROJECT_ROOT / 'img' / 'ProleStatus.png',
|
||||
PROJECT_ROOT / 'img' / 'proleLogoSepia.png',
|
||||
]
|
||||
for p in img_candidates:
|
||||
try:
|
||||
if p.exists():
|
||||
self._app_iconphoto = tk.PhotoImage(file=str(p))
|
||||
try:
|
||||
self.root.iconphoto(True, self._app_iconphoto)
|
||||
except Exception:
|
||||
pass
|
||||
break
|
||||
except Exception:
|
||||
continue
|
||||
|
||||
def configure_styles(self):
|
||||
"""Configure ttk styles"""
|
||||
base_bg = '#f5f5f7'
|
||||
@ -225,6 +286,7 @@ class ProleInstaller:
|
||||
# Hide any legacy frames if they exist
|
||||
for _, f in self.pages:
|
||||
try:
|
||||
|
||||
if f is not None:
|
||||
f.place_forget()
|
||||
f.pack_forget()
|
||||
|
||||
8
installer/README.md
Normal file
8
installer/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Moved
|
||||
|
||||
This document has moved. Please see the up-to-date installer guide at:
|
||||
|
||||
installer/README.md
|
||||
|
||||
The root-level file is kept only as a pointer to avoid breaking links during the refactor.
|
||||
|
||||
0
k3s/create_k3d_join_remote_agents.sh
Normal file → Executable file
0
k3s/create_k3d_join_remote_agents.sh
Normal file → Executable file
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
<dict>
|
||||
<key>Resources/ProleStatus.icns</key>
|
||||
<data>
|
||||
+cdQzwSUcmjm7+xsMSNENM8UmDs=
|
||||
aScVfsEFHQVphfcvzhC9dp1TB0Q=
|
||||
</data>
|
||||
<key>Resources/prole-type.gif</key>
|
||||
<data>
|
||||
@ -14,11 +14,11 @@
|
||||
</data>
|
||||
<key>Resources/prole.properties</key>
|
||||
<data>
|
||||
DrOicjCcsYx0qpecyvrGCknJU/0=
|
||||
Cj9W/KW+Rny/lDw/SJDfNdPFjVY=
|
||||
</data>
|
||||
<key>Resources/statusIcon.png</key>
|
||||
<data>
|
||||
Tdx6sY6fxRnTUTFufZjqK0ciHCQ=
|
||||
3FV12k9vnMTt/OUzA+8MwBJsC4c=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
@ -27,7 +27,7 @@
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Gw6vHKwQDAYnqybQs82BVotLuxQPfeFRosM58Z9veXI=
|
||||
1tKOrjdtGcfGEuLS6EnEdE0lfLpfwgI+Wcq6j8etOUY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/prole-type.gif</key>
|
||||
@ -41,14 +41,14 @@
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
2c+rUHdA13baSVtHIm0CS92ZHfI9jkSJME/tuRSD5Qs=
|
||||
rShwRtFhpcuZ6wbDkVmNg/vd3XzWvL/v8BX6pzk1tdg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Resources/statusIcon.png</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
ryjfhxseGqvWZt2dsVgqZU21o0yPUCsTxHleEpJoo/g=
|
||||
WPDWAmMYDCd1OomngoN/U/IFnTsX1tZsuAZTJhEPtOc=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
@ -757,3 +757,6 @@ Clusters found: 1`;
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user