-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support CDK installation on Mac OS X
Extend support to install CDK on Mac OS X
- Loading branch information
1 parent
4d6f486
commit cc8f7e1
Showing
12 changed files
with
328 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
localhost ansible_connection=local | ||
|
||
[cdk] | ||
localhost ansible_connection=local |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
. /etc/rc.common | ||
dscl . create /Users/{{ username }} | ||
dscl . create /Users/{{ username }} hint '{{ password | replace("'", "'\\''") | truncate(4, True) }}' | ||
dscl . passwd /Users/{{ username }} '{{ password | replace("'", "'\\''") }}' | ||
dscl . create /Users/{{ username }} UniqueID {{ uid.stdout }} | ||
dscl . create /Users/{{ username }} PrimaryGroupID 20 | ||
dscl . create /Users/{{ username }} UserShell /bin/bash | ||
dscl . create /Users/{{ username }} NFSHomeDirectory /Users/{{ username }} | ||
cp -R /System/Library/User\ Template/English.lproj /Users/{{ username }} | ||
chown -R {{ username }}:staff /Users/{{ username }} | ||
|
||
dscl . append /Groups/admin GroupMembership {{ username }} |
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,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
OS=`uname` | ||
pushd ~/cdk/components/rhel/misc/rhel-k8s-singlenode-setup | ||
|
||
case "$OS" in | ||
Linux) | ||
sed -i '$i config.registration.skip = true' Vagrantfile | ||
;; | ||
Darwin) | ||
gsed -i '$i config.registration.skip = true' Vagrantfile | ||
;; | ||
esac | ||
|
||
|
||
if [ -f /etc/redhat-release ]; then | ||
if grep -i fedora /etc/redhat-release; then | ||
vagrant up | ||
elif grep -i 'red hat' /etc/redhat-release; then | ||
scl enable sclo-vagrant1 'bash -c "vagrant up"' | ||
fi | ||
fi | ||
|
||
popd |
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,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
OS=`uname` | ||
pushd ~/cdk/components/rhel/rhel-ose | ||
|
||
case "$OS" in | ||
Linux) | ||
sed -i '$i config.registration.skip = true' Vagrantfile | ||
;; | ||
Darwin) | ||
gsed -i '$i config.registration.skip = true' Vagrantfile | ||
;; | ||
esac | ||
|
||
if [ -f /etc/redhat-release ]; then | ||
if grep -i fedora /etc/redhat-release; then | ||
vagrant up | ||
elif grep -i 'red hat' /etc/redhat-release; then | ||
scl enable sclo-vagrant1 'bash -c "vagrant up"' | ||
fi | ||
fi | ||
|
||
popd |
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,11 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd /home/cdk/cdk/components/rhel/misc/rhel-k8s-singlenode-setup | ||
sed -i '$i config.registration.serverurl = "{{ rhn_server_hostname }}"' Vagrantfile | ||
sed -i '$i config.registration.baseurl = "{{ rhsm_baseurl }}"' Vagrantfile | ||
OS=`uname` | ||
pushd ~/cdk/components/rhel/misc/rhel-k8s-singlenode-setup | ||
|
||
case "$OS" in | ||
Linux) | ||
sed -i '$i config.registration.serverurl = "{{ rhn_server_hostname }}"' Vagrantfile | ||
sed -i '$i config.registration.baseurl = "{{ rhsm_baseurl }}"' Vagrantfile | ||
;; | ||
Darwin) | ||
gsed -i '$i config.registration.serverurl = "{{ rhn_server_hostname }}"' Vagrantfile | ||
gsed -i '$i config.registration.baseurl = "{{ rhsm_baseurl }}"' Vagrantfile | ||
;; | ||
esac | ||
|
||
|
||
if grep -i fedora /etc/redhat-release; then | ||
vagrant up | ||
else | ||
elif grep -i 'red hat' /etc/redhat-release; then | ||
scl enable sclo-vagrant1 'bash -c "vagrant up"' | ||
fi | ||
fi | ||
|
||
popd |
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,11 +1,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd /home/cdk/cdk/components/rhel/rhel-ose | ||
sed -i '$i config.registration.serverurl = "{{ rhn_server_hostname }}"' Vagrantfile | ||
sed -i '$i config.registration.baseurl = "{{ rhsm_baseurl }}"' Vagrantfile | ||
OS=`uname` | ||
pushd ~/cdk/components/rhel/rhel-ose | ||
|
||
case "$OS" in | ||
Linux) | ||
sed -i '$i config.registration.serverurl = "{{ rhn_server_hostname }}"' Vagrantfile | ||
sed -i '$i config.registration.baseurl = "{{ rhsm_baseurl }}"' Vagrantfile | ||
;; | ||
Darwin) | ||
gsed -i '$i config.registration.serverurl = "{{ rhn_server_hostname }}"' Vagrantfile | ||
gsed -i '$i config.registration.baseurl = "{{ rhsm_baseurl }}"' Vagrantfile | ||
;; | ||
esac | ||
|
||
|
||
if grep -i fedora /etc/redhat-release; then | ||
vagrant up | ||
else | ||
elif grep -i 'red hat' /etc/redhat-release; then | ||
scl enable sclo-vagrant1 'bash -c "vagrant up"' | ||
fi | ||
fi | ||
|
||
popd |
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,4 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
wget -A zip,ks,vagrant-libvirt.box -r --no-parent -l1 -nd --reject="index.html*" {{ cdk_location }} | ||
unzip *.zip | ||
OS=`uname` | ||
|
||
case "$OS" in | ||
Linux) | ||
wget -A zip,ks,vagrant-libvirt.box -r --no-parent -l1 -nd --reject="index.html*" {{ cdk_location }} | ||
;; | ||
Darwin) | ||
wget -A zip,ks,vagrant-virtualbox.box -r --no-parent -l1 -nd --reject="index.html*" {{ cdk_location }} | ||
;; | ||
esac | ||
|
||
if [ -f "cdk.zip" ]; then | ||
unzip cdk.zip | ||
fi |
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
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
Oops, something went wrong.