initial import
diff --git a/environments/aws/aws_create.yml b/environments/aws/aws_create.yml index 737f128..f2500e0 100644 --- a/environments/aws/aws_create.yml +++ b/environments/aws/aws_create.yml
@@ -17,4 +17,5 @@ include_vars: "os/{{ os_selection }}.yml" roles: + - apigee-opdk-aws-security-group - apigee-opdk-aws-create
diff --git a/environments/aws/profiles/1601-centos72-aio.yml b/environments/aws/profiles/1601-centos72-aio.yml deleted file mode 100644 index b509bc1..0000000 --- a/environments/aws/profiles/1601-centos72-aio.yml +++ /dev/null
@@ -1,9 +0,0 @@ ---- -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-edge-centos72-aio -application: edge -pod: NA -start: 1 -end: 1 \ No newline at end of file
diff --git a/environments/aws/profiles/1601-centos72-dc1.yml b/environments/aws/profiles/1601-centos72-dc1.yml deleted file mode 100644 index f7e0550..0000000 --- a/environments/aws/profiles/1601-centos72-dc1.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# centos 7.2 -image_id: ami-7209f41f -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-edge-centos72-dc1 -application: edge -pod: NA -start: 1 -end: 9 \ No newline at end of file
diff --git a/environments/aws/profiles/1601-oraclelinux68-dc1-12node.yml b/environments/aws/profiles/1601-oraclelinux68-dc1-12node.yml deleted file mode 100644 index e53de17..0000000 --- a/environments/aws/profiles/1601-oraclelinux68-dc1-12node.yml +++ /dev/null
@@ -1,7 +0,0 @@ ---- -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: "1601-edge-ol68-dc" -application: edge -pod: NA \ No newline at end of file
diff --git a/environments/aws/profiles/1601-oraclelinux68-dc1-2-ms.yml b/environments/aws/profiles/1601-oraclelinux68-dc1-2-ms.yml deleted file mode 100644 index 0b3d5f3..0000000 --- a/environments/aws/profiles/1601-oraclelinux68-dc1-2-ms.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-edge-ol68-dc1 -application: edge -pod: NA -start: 1 -end: 10 \ No newline at end of file
diff --git a/environments/aws/profiles/1601-oraclelinux68-dc1.yml b/environments/aws/profiles/1601-oraclelinux68-dc1.yml deleted file mode 100644 index 1cd0e6b..0000000 --- a/environments/aws/profiles/1601-oraclelinux68-dc1.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-edge-ol68-dc1 -application: edge -pod: NA -start: 1 -end: 9 \ No newline at end of file
diff --git a/environments/aws/profiles/1601-oraclelinux68-dc2-2-ms.yml b/environments/aws/profiles/1601-oraclelinux68-dc2-2-ms.yml deleted file mode 100644 index 3bacb06..0000000 --- a/environments/aws/profiles/1601-oraclelinux68-dc2-2-ms.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-edge-ol68-dc2 -application: edge -pod: NA -start: 1 -end: 10
diff --git a/environments/aws/profiles/1601-oraclelinux68-dc2.yml b/environments/aws/profiles/1601-oraclelinux68-dc2.yml deleted file mode 100644 index 2cb2eb9..0000000 --- a/environments/aws/profiles/1601-oraclelinux68-dc2.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-edge-ol68-dc2 -application: edge -pod: NA -start: 1 -end: 9 \ No newline at end of file
diff --git a/environments/aws/profiles/1601-rhel72-baas.yml b/environments/aws/profiles/1601-rhel72-baas.yml deleted file mode 100644 index 49830f0..0000000 --- a/environments/aws/profiles/1601-rhel72-baas.yml +++ /dev/null
@@ -1,9 +0,0 @@ ---- -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1601-baas-rhel72-1 -application: baas -pod: NA -start: 1 -end: 10
diff --git a/environments/aws/profiles/1609-oraclelinux68-aio.yml b/environments/aws/profiles/1609-oraclelinux68-aio.yml deleted file mode 100644 index 2e813ea..0000000 --- a/environments/aws/profiles/1609-oraclelinux68-aio.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1609-edge-ol68-aio -application: edge -pod: NA -start: 1 -end: 1 \ No newline at end of file
diff --git a/environments/aws/profiles/1609-oraclelinux68-dc1.yml b/environments/aws/profiles/1609-oraclelinux68-dc1.yml deleted file mode 100644 index a04043e..0000000 --- a/environments/aws/profiles/1609-oraclelinux68-dc1.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1609-edge-ol68-dc1 -application: edge -pod: NA -start: 1 -end: 9 \ No newline at end of file
diff --git a/environments/aws/profiles/1609-oraclelinux68-dc2.yml b/environments/aws/profiles/1609-oraclelinux68-dc2.yml deleted file mode 100644 index 8a4dc66..0000000 --- a/environments/aws/profiles/1609-oraclelinux68-dc2.yml +++ /dev/null
@@ -1,11 +0,0 @@ ---- -# oraclelinux 6.8 -image_id: ami-755ba918 -instance_type: 't2.medium' -wait: yes -assign_public_ip: yes -session_name: 1609-edge-ol68-dc2 -application: edge -pod: NA -start: 1 -end: 9 \ No newline at end of file
diff --git a/environments/aws/profiles/baas-1601.yml b/environments/aws/profiles/baas-1601.yml index e5f4b39..9a4e6c0 100644 --- a/environments/aws/profiles/baas-1601.yml +++ b/environments/aws/profiles/baas-1601.yml
@@ -5,3 +5,34 @@ session_name: baas-1601-dc application: baas pod: NA +security_group: OPDK +rules: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 9000 + to_port: 9010 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 8080 + to_port: 8080 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 22 + to_port: 22 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 443 + to_port: 443 +rules_egress: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 172.16.0.0/12 + from_port: 0 + to_port: 65535
diff --git a/environments/aws/profiles/control-server.yml b/environments/aws/profiles/control-server.yml index ced59cd..5160c9a 100644 --- a/environments/aws/profiles/control-server.yml +++ b/environments/aws/profiles/control-server.yml
@@ -2,6 +2,37 @@ instance_type: 't2.medium' wait: yes assign_public_ip: yes -session_name: opdk-control-server +session_name: control-server application: edge -pod: NA \ No newline at end of file +pod: NA +security_group: OPDK +rules: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 9000 + to_port: 9010 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 8080 + to_port: 8080 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 22 + to_port: 22 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 443 + to_port: 443 +rules_egress: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 172.16.0.0/12 + from_port: 0 + to_port: 65535
diff --git a/environments/aws/profiles/edge-1601-edgemicro.yml b/environments/aws/profiles/edge-1601-edgemicro.yml new file mode 100644 index 0000000..e5904ea --- /dev/null +++ b/environments/aws/profiles/edge-1601-edgemicro.yml
@@ -0,0 +1,51 @@ +--- +instance_type: 't2.medium' +wait: yes +assign_public_ip: yes +session_name: edgemicro-1601-dc +application: edge +pod: NA +env: edgemicro +security_group: EDGEMICRO +rules: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 9000 + to_port: 9010 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 8080 + to_port: 8080 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 22 + to_port: 22 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 443 + to_port: 443 + - proto: tcp + cidr_ip: 172.16.0.0/12 + from_port: 0 + to_port: 65535 +rules_egress: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 172.16.0.0/12 + from_port: 0 + to_port: 65535 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 443 + to_port: 443 + - proto: udp + cidr_ip: 0.0.0.0/0 + from_port: 443 + to_port: 123
diff --git a/environments/aws/profiles/edge-1601.yml b/environments/aws/profiles/edge-1601.yml index 34a379a..ccdb1c0 100644 --- a/environments/aws/profiles/edge-1601.yml +++ b/environments/aws/profiles/edge-1601.yml
@@ -2,6 +2,37 @@ instance_type: 't2.medium' wait: yes assign_public_ip: yes -session_name: "edge-1601-dc" +session_name: edge-1601-dc application: edge -pod: NA \ No newline at end of file +pod: NA +security_group: OPDK +rules: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 9000 + to_port: 9010 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 8080 + to_port: 8080 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 22 + to_port: 22 + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 443 + to_port: 443 +rules_egress: + - proto: tcp + cidr_ip: 0.0.0.0/0 + from_port: 80 + to_port: 80 + - proto: tcp + cidr_ip: 172.16.0.0/12 + from_port: 0 + to_port: 65535
diff --git a/environments/aws/remove-security-group.yml b/environments/aws/remove-security-group.yml new file mode 100644 index 0000000..ca98ae8 --- /dev/null +++ b/environments/aws/remove-security-group.yml
@@ -0,0 +1,15 @@ +--- +- hosts: localhost + connection: local + vars_files: + - ~/.apigee/credentials.yml + + tasks: + - name: Remove security group + ec2_group: + state: "{{ ec2_group_state | d('absent') }}" + name: "{{ security_group | d('EDGEMICRO') }}" + description: Security group for Edgemicro + aws_access_key: "{{ aws_access_key|default(lookup('env', 'AWS_ACCESS_KEY_ID')) }}" + aws_secret_key: "{{ aws_secret_key|default(lookup('env', 'AWS_SECRET_ACCESS_KEY')) }}" + aws_region: "{{ aws_region|default(lookup('env', 'AWS_REGION')) }}"
diff --git a/installations/edgemicro/installation.yml b/installations/edgemicro/installation.yml index f455e54..a6c8ad1 100644 --- a/installations/edgemicro/installation.yml +++ b/installations/edgemicro/installation.yml
@@ -1,6 +1,8 @@ --- - hosts: '{{ hosts }}' - + roles: + - apigee-opdk-setup-os-minimum + - apigee-opdk-setup-os-common tasks: - name: Install needed Python libraries become: yes @@ -37,12 +39,16 @@ - name: Install edgemicro become: yes npm: - name: '{{ item }}' + name: '{{ item.name }}' + version: '{{ item.version }}' global: yes state: present with_items: - - edgemicro + - { name: edgemicro, version: '2.2.1' } - name: Create edgemicro default configuration shell: 'edgemicro init' + +# configure with edge +# edgemicro private configure -m http://172.31.23.239:8080 -r http://172.31.22.140:9001 -o opdk -e test -u opdk@apigee.com -p Apigee123! -v default \ No newline at end of file