diff --git a/source/orchestrationLogic/HEAT/DC/dc.yaml b/source/orchestrationLogic/HEAT/DC/dc.yaml deleted file mode 100644 index e5a8b0d73d5e1964d09da5d6cb85c7164f11b076..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/DC/dc.yaml +++ /dev/null @@ -1,19 +0,0 @@ -heat_template_version: 2018-08-31 - -resources: - dc: - type: OS::Nova::Server - properties: - name: nydc3 - image: Windows Server 2022 Standard [Licensed] - flavor: m1.medium - key_name: mankey - networks: - - port: { get_resource: dc_private_port } - user_data: {get_file: dc-init.ps1} - dc_private_port: - type: OS::Neutron::Port - properties: - network: vibrant_lark_NET - fixed_ips: - - ip_address: "192.168.0.110" \ No newline at end of file diff --git a/source/orchestrationLogic/HEAT/DC/domain_controller.yaml b/source/orchestrationLogic/HEAT/DC/domain_controller.yaml deleted file mode 100644 index bbcd07a7fbfdc1ea13c8fadb4d90f9501efb1176..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/DC/domain_controller.yaml +++ /dev/null @@ -1,30 +0,0 @@ -heat_template_version: 2018-08-31 - -description: This is a domain controller used as a proof of concept for the ROSE project. - - -resources: - dc: - type: OS::Nova::Server - properties: - key_name: mankey - name: dc - image: dc-signed-out-adm # Windows Server 2022 Standard [Licensed] - flavor: m1.medium - networks: - #- network: vibrant_lark_NET - - port: { get_resource: dc_private_port } - user_data: - str_replace: - - template: | #{get_file: dc-init.ps} - #ps1 - tzutil /s "W. Europe Standard Time" - - - dc_private_port: - type: OS::Neutron::Port - properties: - network: vibrant_lark_NET - fixed_ips: - - ip_address: "192.168.0.110" diff --git a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/base.yaml b/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/base.yaml deleted file mode 100644 index 108d2a62931ee43f9f0853aea81cf4c7e0267050..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/base.yaml +++ /dev/null @@ -1,172 +0,0 @@ -heat_template_version: 2018-08-31 - -description: > - HOT for å sette opp base nettverket - -parameters: - projectName: - type: string - description: Prosjekt Navn - key_name: - type: string - description: keypair of ssh - windowsCount: - type: string - -resources: - heat_network: - type: OS::Neutron::Net - properties: - admin_state_up: true - name: - list_join: ['_', [{get_param: projectName}, 'NET']] - - heat_router: - type: OS::Neutron::Router - properties: - admin_state_up: True - name: - list_join: ['_', [{get_param: projectName}, 'Router']] - external_gateway_info: { network: ntnu-internal} - - router_interface: - properties: - router_id: { get_resource: heat_router} - subnet: { get_resource: heat_network_subnet} - type: OS::Neutron::RouterInterface - - heat_network_subnet: - type: "OS::Neutron::Subnet" - properties: - cidr: 192.168.0.0/24 - dns_nameservers: - - "8.8.8.8" - gateway_ip: "192.168.0.1" - ip_version: 4 - network: { get_resource: heat_network} - - #secgroup_nfsserver: - # type: OS::Neutron::SecurityGroup - # properties: - # rules: - # - protocol: icmp - # remote_ip_prefix: '0.0.0.0/0' - # direction: 'egress' - # - protocol: icmp - # remote_ip_prefix: '::/0' - # ethertype: 'IPv6' - # direction: 'egress' - # - protocol: tcp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 111 - # port_range_max: 111 - # remote_mode: remote_group_id - # remote_group_id: { get_resource: secgroup_nfsclient } - # - protocol: udp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 111 - # port_range_max: 111 - # remote_mode: remote_group_id - # remote_group_id: { get_resource: secgroup_nfsclient } - # - protocol: tcp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 2049 - # port_range_max: 2049 - # remote_mode: remote_group_id - # remote_group_id: { get_resource: secgroup_nfsclient } - # - protocol: udp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 2049 - # port_range_max: 2049 - # remote_mode: remote_group_id - # remote_group_id: { get_resource: secgroup_nfsclient } - # - protocol: tcp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 32767 - # port_range_max: 32768 - # remote_mode: remote_group_id - # remote_group_id: { get_resource: secgroup_nfsclient } - # - protocol: udp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 32767 - # port_range_max: 32768 - # remote_mode: remote_group_id - # remote_group_id: { get_resource: secgroup_nfsclient} - # - protocol: tcp - # remote_ip_prefix: '0.0.0.0/8' - # port_range_min: 22 - # port_range_max: 22 - - - #secgroup_nfsclient: - # type: OS::Neutron::SecurityGroup - # properties: - # rules: - # - protocol: tcp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 111 - # port_range_max: 111 - # direction: 'egress' - # - protocol: udp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 111 - # port_range_max: 111 - # direction: 'egress' - # - protocol: tcp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 2049 - # port_range_max: 2049 - # direction: 'egress' - # - protocol: udp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 2049 - # port_range_max: 2049 - # direction: 'egress' - # - protocol: tcp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 32767 - # port_range_max: 32768 - # direction: 'egress' - # - protocol: udp - # remote_ip_prefix: '192.168.0.0/24' - # port_range_min: 32767 - # port_range_max: 32768 - # direction: 'egress' - - #secgroup_administration: - # type: OS::Neutron::SecurityGroup - # properties: - # rules: - # - protocol: icmp - # remote_ip_prefix: '0.0.0.0/0' - # direction: 'egress' - # - protocol: icmp - # remote_ip_prefix: '::/0' - # ethertype: 'IPv6' - # direction: 'egress' - # - protocol: icmp - # remote_ip_prefix: '0.0.0.0/0' - # - protocol: icmp - # remote_ip_prefix: '::/0' - # ethertype: 'IPv6' - # - protocol: tcp - # port_range_min: 22 - # port_range_max: 22 - # remote_ip_prefix: '0.0.0.0/8' - -outputs: - heat_network: - description: A Nettverket laget for prosjektet - value: { get_resource: heat_network} - heat_network_subnet: - description: B Nettverkets subnett - value: { get_resource: heat_network_subnet} - #secgroup_nfsserver: - # description: D Sikkerhetsgruppen laget for å lage nfs-serveren - # value: { get_resource: secgroup_nfsserver} - #secgroup_nfsclient: - # description: C Sikkerhetsgruppen laget for å gi tilgang til nfs-serveren - # value: { get_resource: secgroup_nfsclient} - #secgroup_administration: - # description: E Sikkerhetsgruppen laget for admin tilgang - # value: { get_resource: secgroup_administration} \ No newline at end of file diff --git a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/createClient.yaml b/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/createClient.yaml deleted file mode 100644 index 8be47c36f6dad7cd6bb1b8babd426d93baf82d93..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/createClient.yaml +++ /dev/null @@ -1,118 +0,0 @@ -heat_template_version: 2018-08-31 - -description: > - Heat-template for konstruksjon av clientServere - -parameters: - projectName: - type: string - - windowsCount: - type: number - description: Antall Windows VMer - default: 3 - - key_name: - type: string - description: name of keypair to enable ssh to the instance - - heat_network: - type: string - - flavor: - type: string - description: I am using the smallest flavor available because i'll be spinning up a cirros instance. You can use an environment file to override the defaults. - default: m1.small - constraints: - - custom_constraint: nova.flavor - - #secgroup_nfsclient: - # type: string - #secgroup_adminstration: - # type: string - - subnet_id: - type: string - - image: - type: string - description: This uses a cirros image but you can create an environment file to change the default values. - default: "Ubuntu Server 20.04 GRID CUDA 11.4" - constraints: - - custom_constraint: glance.image - -resources: - #cloudconf_base: - # type: parts/baseconfig.yaml - # properties: - # key_name: { get_param: key_name } - - cloudconf_nfs: - type: OS::Heat::CloudConfig - properties: - cloud_config: - packages: - - 'nfs-common' - - cloudconf_client: - type: OS::Heat::MultipartMime - properties: - parts: - # - config: { get_resource: cloudconf_base } - # - config: { get_resource: cloudconf_nfs } - - heat_testserver1: - type: OS::Nova::Server - properties: - name: - list_join: ['-', [{get_param: projectName}, 'heat_testserver1']] - flavor: {get_param: flavor} - image: {get_param: image} - key_name: {get_param: key_name} - networks: - - network: { get_param: heat_network} - # security_groups: - # - { get_param: secgroup_nfsclient } - # - { get_param: secgroup_adminstration} - user_data_format: RAW - user_data: { get_resource: cloudconf_client } - - heat_testserver1_floating_ip_association: - type: OS::Neutron::FloatingIPAssociation - properties: - floatingip_id: { get_resource: heat_testserver1_floating_ip} - port_id: {get_attr: [heat_testserver1, addresses, {get_param: heat_network}, 0, port]} - - heat_testserver1_floating_ip: - type: OS::Neutron::FloatingIP - properties: - floating_network: ntnu-internal - - heat_testserver2: - type: OS::Nova::Server - properties: - key_name: {get_param: key_name} - name: - list_join: ['-', [{get_param: projectName}, 'heat_testserver2']] - flavor: {get_param: flavor} - image: {get_param: image} - networks: - - network: { get_param: heat_network} - # security_groups: - # - { get_param: secgroup_nfsclient } - # - { get_param: secgroup_adminstration} - user_data_format: RAW - user_data: { get_resource: cloudconf_client} - - heat_testserver2_floating_ip_association: - type: OS::Neutron::FloatingIPAssociation - properties: - floatingip_id: { get_resource: heat_testserver2_floating_ip} - port_id: {get_attr: [heat_testserver2, addresses, {get_param: heat_network}, 0, port]} - - heat_testserver2_floating_ip: - type: OS::Neutron::FloatingIP - properties: - floating_network: ntnu-internal - -outputs: \ No newline at end of file diff --git a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/filserver.yaml b/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/filserver.yaml deleted file mode 100644 index 9bacc936a9820cc868746bcafcc0793db781e212..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/filserver.yaml +++ /dev/null @@ -1,150 +0,0 @@ -heat_template_version: 2018-08-31 - -description: > - HOT fil for å konfigurere filserveren for et prosjekt. - -parameters: - projectName: - type: string - - key_name: - type: string - description: ssh-key til admin - - flavor: - type: string - label: filserver flavor - description: Flavoren til filserveren for prosjektet - constraints: - - custom_constraint: nova.flavor - default: m1.tiny - - image: - type: string - description: This uses a cirros image but you can create an environment file to change the default values. - default: "Ubuntu Server 20.04 GRID CUDA 11.4" - constraints: - - custom_constraint: glance.image - - volume: - type: string - label: Volum - description: Uuid til volumet laget i filvolume.yaml - - #secgroup_nfsserver: - # type: string - # - #secgroup_administration: - # type: string - - heat_network: - type: string - - heat_network_subnet: - type: string - - -resources: - #cloudconf_base: - # type: parts/baseconfig.yaml - # properties: - # key_name: { get_param: key_name } - - cloudconf_nfs: - type: OS::Heat::CloudConfig - properties: - cloud_config: - packages: - - 'nfs-kernel-server' - write_files: - - content: '/opt/data/shared 0.0.0.0/8(rw,sync,no_subtree_check)' - path: '/etc/exports' - - content: | - options lockd nlm_udpport=32768 nlm_tcpport=32768 - options nfs callback_tcpport=32764 - path: '/etc/modprobe.d/local.conf' - disk_setup: - /dev/vdb: - table_type: gpt - layout: true - overwrite: false - fs_setup: - - filesystem: 'ext4' - label: 'datapartition' - device: '/dev/vdb' - partition: 'auto' - - script_nfs: - type: OS::Heat::SoftwareConfig - properties: - group: ungrouped - config: | - #!/bin/bash - sed -i -r 's/STATDOPTS=.*/STATDOPTS="--port 32765 --outgoing-port 32766"/' /etc/default/nfs-common - sed -i -r 's/RPCMOUNTDOPTS=.*/RPCMOUNTDOPTS="-p 32767"/' /etc/default/nfs-kernel-server - - script_mounts: - type: OS::Heat::SoftwareConfig - properties: - group: ungrouped - config: | - #!/bin/bash - echo "/dev/vdb1 /opt/data ext4 defaults,comment=cloudconfig 0 0" >> \ - /etc/fstab - mkdir /opt/data - mount /dev/vdb1 /opt/data - mkdir /opt/data/shared - chown ubuntu:ubuntu /opt/data/shared - - cloudconf_fileserver: - type: OS::Heat::MultipartMime - properties: - parts: - # - config: { get_resource: cloudconf_base} - - config: { get_resource: cloudconf_nfs} - - config: { get_resource: script_mounts} - - config: { get_resource: script_nfs} - - heat_filserver: - type: OS::Nova::Server - properties: - key_name: {get_param: key_name} - name: - list_join: ['-', [{get_param: projectName}, 'heat_filserver']] - flavor: {get_param: flavor} - image: {get_param: image} - networks: - - network: { get_param: heat_network} - #security_groups: - # - { get_param: secgroup_nfsserver } - # - { get_param: secgroup_administration} - user_data_format: RAW - user_data: { get_resource: cloudconf_fileserver} - - heat_server_floating_ip_association: - type: OS::Neutron::FloatingIPAssociation - properties: - floatingip_id: { get_resource: heat_server_floating_ip } - port_id: {get_attr: [heat_filserver, addresses, {get_param: heat_network}, 0, port]} - - heat_server_floating_ip: - type: OS::Neutron::FloatingIP - properties: - floating_network: ntnu-internal - - filvolume_attachment: - type: OS::Cinder::VolumeAttachment - properties: - instance_uuid: { get_resource: heat_filserver} - volume_id: { get_param: volume } - -outputs: - filserver_adresse: - description: A Filserverens ip-adresse - value: { get_attr: [ heat_filserver, first_address] } - filserver_floating_ip: - description: B Filserverens floating-ip - value: { get_resource: heat_server_floating_ip} - filserver_port_id: - description: C Filserverens floating-ip port - value: { get_resource: heat_filserver_port} \ No newline at end of file diff --git a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/filvolume.yaml b/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/filvolume.yaml deleted file mode 100755 index 6df32b7ce6571349f0660ce7b2689b74f06c0a10..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/filvolume.yaml +++ /dev/null @@ -1,31 +0,0 @@ -heat_template_version: 2018-08-31 - -description: > - HOT som lager volumet som brukes på filserveren - -parameters: - volume_type: - type: string - label: Volume type - default: SSD-300 - description: Cinder typen som brukes - constraints: - - custom_constraint: cinder.vtype - - volume_size: - type: number - label: volume size - default: 3 - description: størrelsen på volumet - -resources: - volume: - type: OS::Cinder::Volume - properties: - size: { get_param: volume_size } - volume_type: { get_param: volume_type} - -outputs: - volume: - description: Volumet laget - value: {get_resource: volume} \ No newline at end of file diff --git a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/parts/baseconfig.yaml b/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/parts/baseconfig.yaml deleted file mode 100644 index ab1d8e2c365453350caffea249db73ea727a2324..0000000000000000000000000000000000000000 --- a/source/orchestrationLogic/HEAT/HEAT_TEST_ANDERS/parts/baseconfig.yaml +++ /dev/null @@ -1,36 +0,0 @@ -heat_template_version: 2018-08-31 - -parameters: - key_name: - type: string - label: SSH Key - description: SSH-nøkkelen til admin serveren i ROSE-NET - -resources: - cloudconf_base: - type: OS::Heat::CloudConfig - properties: - cloud_config: - key_name: {get_param: key_name } - package_update: true - package_upgrade: true - timezone: "Europe/Oslo" - users: - - name: administrator - sudo: ALL=(ALL) NOPASSWD:ALL - shell: /bin/bash - ssh_authorized_keys: - - { get_param: key_name } - - name: ubuntu - lock_passwd: True - shell: /bin/bash - ssh_authorized_keys: - - { get_param: key_name } - power_state: - mode: 'reboot' - message: 'Reboots after installing' - condition: True - -outputs: - OS::stack_id: - value: { get_resource: cloudconf_base} \ No newline at end of file diff --git a/source/tmpTest.py b/source/tmpTest.py deleted file mode 100644 index 1abec01f3c8eecd4b8e4ae9db76f7d4a7e5a3a97..0000000000000000000000000000000000000000 --- a/source/tmpTest.py +++ /dev/null @@ -1,7 +0,0 @@ -from orchestrationLogic.orchestrator import * - -orch = orchestrator() - -name = orch.createProjectWithClients(3, "testOwner") - -print("create project returnerte nå") \ No newline at end of file