<commit_before>#!/bin/bash
## \file    boot.sh
#  \author  <NAME> <<EMAIL>>
#  \brief   Boots an instance
#  
#  Copyright 2013 <NAME>
#  
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#  
#      http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

git push

vmname=$USER-base-vm
nova delete $vmname

flavor="m1.small"
image="centos-6-20130416"
key="ubuntu-vm"
secgroups="ssh,http"

nova boot \
    --flavor $flavor \
    --image $image \
    --key_name $key \
    --security_groups $secgroups \
    --user_data userdata.sh \
    --file "/root/.ssh/id_rsa=private/repos/id_rsa" \<commit_msg>Add stuff for Nectar cloud<commit_after>#!/bin/bash
## \file    boot.sh
#  \author  <NAME> <<EMAIL>>
#  \brief   Boots an instance
#  
#  Copyright 2013 <NAME>
#  
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#  
#      http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

git push

vmname=$USER-base-vm
nova delete $vmname

if [ "$OS_AUTH_URL" == "https://keystone.rc.nectar.org.au:5000/v2.0/" ]; then
    # NeCTAR cloud
    image="NeCTAR CentOS 6.4 x86_64"
    key="walesnix"
else
    # NCI cloud
    image="centos-6-20130416"
    key="ubuntu-vm"
fi

flavor="m1.small"
secgroups="ssh,http"

nova boot \
    --flavor "$flavor" \
    --image "$image" \
    --key_name "$key" \
    --security_groups "$secgroups" \
    --user_data userdata.sh \
    --file "/root/.ssh/id_rsa=private/repos/id_rsa" \
{'fraction_non_alphanumeric': 0.11816192560175055, 'fraction_numerical': 0.02100656455142232, 'mean_word_length': 3.141304347826087, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '147930', 'n_tokens_mistral': 796, 'n_tokens_neox': 758, 'n_words': 249}