Commit f68153bd authored by Mark Beierl's avatar Mark Beierl
Browse files

Initial load

parent facdb3f8
Loading
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
## Setting up Participant VMs

First, check the common-vars for the following:

```
APT_PROXY=http://172.21.1.1:3142
FLAVOR=m1.xlarge
PROJECT=f15ab4f845dc4052811fce96a3676ac8
SUBNET=172.21.248
```

APT_PROXY: the address of a caching web proxy for installing packages
FLAVOR: the flavour of the new VM to launch.  Must have at least 4 CPUs, 8 GB RAM and 60 GB Disk.
PROJECT: The project ID in which to launch the new VM
SUBNET: the first three octets of the subnet to use.  IP addresses will be allocated from this subnet, starting with .101 - .199

### Creating ports
This script will create the ports in Openstack on the subnet specified
```
./create-osm-vm-ports.sh
```

### Launching VM
This script will launch all the OSM VMs in a loop

```
./create-osm-vm-servers.sh
```


### Initial Configuration
This script updates apt, upgrades the system to the latest 20.04 and installs remote desktop software

```
./run-vm-setup.sh
```

### Install OSM

This script downloads the installer and runs it.  It also sets the OSM admin password to `hackfest`.
```
./run-install-osm.sh
```

### Add VIM and K8s Cluster

```
./run-osm-vim-k8scluster-add.sh
```
+10 −0
Original line number Diff line number Diff line
#OpenStack Credentials
export OS_AUTH_URL=http://172.21.247.1:5000/v3
export OS_PROJECT_NAME=hackfest
export OS_USER_DOMAIN_NAME='Default'
export OS_PROJECT_DOMAIN_ID='default'
export OS_USERNAME=hackfest
export OS_PASSWORD=`cat admin.password`
export OS_REGION_NAME='RegionOne'
export OS_INTERFACE=public
export OS_IDENTITY_API_VERSION=3
+17 −0
Original line number Diff line number Diff line
START=1
MAX=1

if [ ! -z $2 ] ; then
    START=$1
    MAX=$2
elif [ ! -z $1 ] ; then
    MAX=$1
fi

# ETSI VIM ADMIN_DOMAIN=default, Partner Cloud=admin_domain
ADMIN_DOMAIN=default
APT_PROXY=http://172.21.1.1:3142
FLAVOR=m1.xlarge
KEY_NAME=mbeierl
NETWORK=osm-ext
SUBNET=172.21.248
+42 −0
Original line number Diff line number Diff line
#!/bin/bash

. ./common-vars
. ./admin-credentials.rc

for PARTICIPANT in `seq ${START} ${MAX}` ; do

    OPENSTACK_USER=hackfest-${PARTICIPANT}
    PROJECT=hackfest-${PARTICIPANT}
    PASSWORD=hackfest

    echo "Creating OpenStack project: $PROJECT"
    openstack project create --domain ${ADMIN_DOMAIN} $PROJECT
    PROJECT_ID=`openstack project list | grep $PROJECT | awk '{print $2}'`
    openstack quota set --cores 64 --ram 131072 $PROJECT_ID

    echo "Creating OpenStack User"
    openstack user create --domain ${ADMIN_DOMAIN} --password $PASSWORD $OPENSTACK_USER
    openstack role add --user $OPENSTACK_USER --project $PROJECT member

    echo "Creating OpenStack Network RBAC policy access_as_external, for network $NETWORK and project $PROJECT"
    openstack network rbac create \
        --target-project $PROJECT \
        --type network \
        --action access_as_external \
        $NETWORK

    echo "Creating OpenStack Network RBAC policy access_as_shared, for network $NETWORK and project $PROJECT"
    openstack network rbac create \
        --target-project $PROJECT \
        --type network \
        --action access_as_shared \
        $NETWORK

    echo "Adding security groups"
    for i in $(openstack --os-username=$OPENSTACK_USER --os-password=$PASSWORD --os-project-id=$PROJECT_ID security group list | awk '/default/{ print $2 }'); do
        openstack --os-username=$OPENSTACK_USER --os-password=$PASSWORD --os-project-id=$PROJECT_ID security group rule create $i --protocol icmp --remote-ip 0.0.0.0/0
        openstack --os-username=$OPENSTACK_USER --os-password=$PASSWORD --os-project-id=$PROJECT_ID security group rule create $i --protocol udp --remote-ip 0.0.0.0/0
        openstack --os-username=$OPENSTACK_USER --os-password=$PASSWORD --os-project-id=$PROJECT_ID security group rule create $i --protocol tcp --remote-ip 0.0.0.0/0
    done

done
 No newline at end of file
+10 −0
Original line number Diff line number Diff line
#!/bin/bash
. ./common-vars $@

. ./admin-credentials.rc

for PARTICIPANT in `seq ${START} ${MAX}` ; do
  IP=`expr ${PARTICIPANT} + 100`
  PROJECT="hackfest-${PARTICIPANT}"
  openstack port create --fixed-ip ip-address=${SUBNET}.${IP} --project=${PROJECT} --enable --network osm-ext hackfest-osm-${PARTICIPANT}
done
Loading