Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
Puppet module to install all software needed to set up HySDS
and verdi job workers.


## Prerequisites
Create a base CentOS7 image as described [here](https://github.com/hysds/hysds-framework/wiki/Puppet-Automation#create-a-base-centos-7-image-for-installation-of-all-hysds-component-instances).

Create a base CentOS7 image as described [here](https://github.com/hysds/hysds-framework/wiki/Puppet-Automation#create-a-base-centos-7-image-for-installation-of-all-hysds-component-instances).

## Installation

As _root_ run:
```
bash < <(curl -skL https://github.com/hysds/puppet-verdi/raw/master/install.sh)

```sh
bash < <(curl -skL https://github.com/hysds/puppet-verdi/raw/azure/install.sh)
```
13 changes: 10 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
mods_dir=/etc/puppet/modules
cd $mods_dir

###############################################################################
# IMPORTANT: please edit this branch name to the version of the Azure #
# adaptation that you want to install on every Puppet module #
###############################################################################
git_branch="azure"


##########################################
# need to be root
##########################################
Expand Down Expand Up @@ -65,7 +72,7 @@ site_pp=$mod_dir/site.pp

# check that module is here; if not, export it
if [ ! -d $mod_dir ]; then
$git_cmd clone $git_loc $mod_dir
$git_cmd clone -b $git_branch --single-branch $git_loc $mod_dir
fi


Expand All @@ -79,7 +86,7 @@ site_pp=$mod_dir/site.pp

# check that module is here; if not, export it
if [ ! -d $mod_dir ]; then
$git_cmd clone $git_loc $mod_dir
$git_cmd clone -b $git_branch --single-branch $git_loc $mod_dir
fi


Expand All @@ -93,7 +100,7 @@ site_pp=$mod_dir/site.pp

# check that module is here; if not, export it
if [ ! -d $mod_dir ]; then
$git_cmd clone $git_loc $mod_dir
$git_cmd clone -b $git_branch --single-branch $git_loc $mod_dir
fi


Expand Down
6 changes: 6 additions & 0 deletions lib/facter/azure_public_ipv4.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# azure_public_ipv4.rb
Facter.add("ec2_public_ipv4") do
setcode do
%x{curl -H Metadata:true "http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipaddress/0/publicip?api-version=2017-03-01&format=text"}.chomp
end
end
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<body>
<h1>TOC for <%= @hostname %></h1>
<ol>
<li><a href="http://<%= @ec2_public_ipv4 %>:8085">WebDAV</a></li>
<li><a href="http://<%= @azure_public_ipv4 %>:8085">WebDAV</a></li>
</ol>
</body>
</html>
5 changes: 5 additions & 0 deletions templates/install_hysds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ cd $OPS/$PACKAGE
pip install -U pyasn1
pip install -U pyasn1-modules
pip install -U python-dateutil
pip install azure
pip install msrest
pip install msrestazure
pip install azure-mgmt
pip install azure-cli
pip install -e .
if [ "$?" -ne 0 ]; then
echo "Failed to run 'pip install -e .' for $PACKAGE."
Expand Down