-
Notifications
You must be signed in to change notification settings - Fork 8
Update install.sh #2
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
Open
Bitsonwheels
wants to merge
6
commits into
apache:main
Choose a base branch
from
Bitsonwheels:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
cbdaf72
Update install.sh
Bitsonwheels 6daaabb
add apparmor to installed apps
Bitsonwheels 020e58b
change curl urls
Bitsonwheels 3eacc1d
Update README.md
Bitsonwheels 7344b89
fix "No such file or directory" and apparmor error
Bitsonwheels 24f808e
Update README.md
Bitsonwheels File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -8,13 +8,13 @@ NOTE: Work in progress | |
| To install and deploy [CloudStack](https://cloudstack.apache.org), just copy and run the following as `root` user: | ||
|
|
||
| ```bash | ||
| curl -sL https://c8k.in/stall.sh | bash | ||
| curl -sL https://raw.githubusercontent.com/Bitsonwheels/cloudstack-installer/refs/heads/main/install.sh | bash | ||
| ``` | ||
|
|
||
| Here's how you should really run it though: | ||
|
|
||
| ```bash | ||
| curl -o install.sh https://c8k.in/stall.sh | ||
| curl -o install.sh https://raw.githubusercontent.com/Bitsonwheels/cloudstack-installer/refs/heads/main/install.sh | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't hardcode to this repo |
||
| cat install.sh | more # to read it | ||
| bash -x install.sh # to also see what it's doing | ||
| ``` | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -72,7 +72,7 @@ warn "Work in progress, try again while this is being hacked" | |
| ### Setup Prerequisites ### | ||
| info "Installing dependencies" | ||
| apt-get update | ||
| apt-get install -y openssh-server sudo wget jq htop tar nmap bridge-utils | ||
| apt-get install -y gpg apparmor openssh-server sudo wget jq htop tar nmap bridge-utils | ||
|
|
||
| # FIXME: check for host spec (min 4-8G RAM?) /dev/kvm and | ||
|
|
||
|
|
@@ -84,7 +84,7 @@ setup_bridge() { | |
| return | ||
| fi | ||
|
|
||
| interface=$(find /sys/class/net -type l -not -lname '*virtual*' -printf '%f\n' | sort | head -1) | ||
| interface=$(ip route get 8.8.8.8 | awk -F"dev " 'NR==1 {split($2,a," ");print a[1]}' | sort | head -1) | ||
| gateway=$(ip route show 0.0.0.0/0 dev $interface | cut -d ' ' -f 3) | ||
| hostipandsub=$(ip -4 -br addr show $interface | awk '{ print $3; }' ) | ||
| info "Setting up bridge on $interface which has IP $hostipandsub and gateway $gateway" | ||
|
|
@@ -116,7 +116,8 @@ EOF | |
|
|
||
| # FIX netplan complaining about permissions | ||
| chmod 600 /etc/netplan/01-netcfg.yaml | ||
|
|
||
| # FIX "No such file or directory" error | ||
| mkdir /etc/cloud/ && mkdir /etc/cloud/cloud.cfg.d/ | ||
| info "Disabling cloud-init netplan config" | ||
| rm -f /etc/netplan/50-cloud-init.yaml | ||
| if [[ ! -f "/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" && ! -f "/etc/cloud/cloud.cfg.d/99_disable-network-config.cfg" ]]; then | ||
|
|
@@ -138,10 +139,14 @@ EOF | |
|
|
||
| configure_repo() { | ||
| info "Configuring CloudStack $CS_VERSION repo" | ||
| NAME=$(sed -rn 's|^deb\s+\S+\s+(\w+)\s+main.*$|\1|p' /etc/apt/sources.list | head -n 1) | ||
|
|
||
| mkdir -p /etc/apt/keyrings | ||
| wget -O - https://download.cloudstack.org/release.asc | sudo tee /etc/apt/trusted.gpg.d/cloudstack.asc | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. duplicate here? |
||
| wget -O- https://download.cloudstack.org/release.asc 2>/dev/null | gpg --dearmor | sudo tee /etc/apt/keyrings/cloudstack.gpg > /dev/null | ||
| # NOTE: debian-based distro packages are now release agnostic | ||
| echo deb [signed-by=/etc/apt/keyrings/cloudstack.gpg] https://download.cloudstack.org/ubuntu noble $CS_VERSION > /etc/apt/sources.list.d/cloudstack.list | ||
| echo deb [signed-by=/etc/apt/keyrings/cloudstack.gpg] https://download.cloudstack.org/ubuntu $NAME $CS_VERSION > /etc/apt/sources.list.d/cloudstack.list | ||
| apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3D62B837F100E758 | ||
| apt-get update | ||
| } | ||
|
|
||
|
|
@@ -222,8 +227,8 @@ configure_host() { | |
| # Ubuntu: disable apparmor | ||
| ln -sf /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ | ||
| ln -sf /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/ | ||
| apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd | ||
| apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper | ||
| apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd --subdomainfs | ||
| apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper --subdomainfs | ||
| fi | ||
|
|
||
| if ! kvm-ok; then | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't hardcode to this repo