Skip to content

Commit

Permalink
Merge pull request #409 from QualiSystems/develop
Browse files Browse the repository at this point in the history
Merging dev to master for 2.0 release
  • Loading branch information
alexazarh committed Oct 26, 2017
2 parents 8b01ad9 + d54c177 commit 3d33c15
Show file tree
Hide file tree
Showing 75 changed files with 4,020 additions and 589 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[report]
omit =
package/setup.py,
package/tests/*.py
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ install:
- pip install mock
- pip install "cloudshell-core>=2.2.0,<2.3.0"
- pip install "cloudshell-shell-core>=3.1.0,<3.2.0"
- pip install "cloudshell-automation-api>=8.0.0.0,<8.1.0.0" --extra-index-url https://testpypi.python.org/simple
- pip install "cloudshell-automation-api>=8.2.0.0,<8.3.0.0" --extra-index-url https://testpypi.python.org/simple

script:
- pushd package
Expand Down
24 changes: 12 additions & 12 deletions cloudformation/0_Main_EX_No_VPN.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,74 +66,74 @@
"QualixAMI": "ami-6d1c2007",
"ESAMI": "ami-84780f93",
"NatAMI": "ami-4868ab25",
"QSAMI":"ami-f4d1f0e2"
"QSAMI":"ami-5648ad2c"

},
"us-east-2": {
"QualixAMI": "ami-6a2d760f",
"ESAMI": "ami-a57055c0",
"NatAMI": "ami-92a6fef7",
"QSAMI":"ami-3487a151"
"QSAMI":"ami-d3e7c5b6"
},
"eu-west-1": {
"QualixAMI": "ami-7abd0209",
"ESAMI": "ami-f88bf78b",
"NatAMI": "ami-a8dd45db",
"QSAMI":"ami-2d809e4b"
"QSAMI":"ami-e92fec90"
},
"us-west-1": {
"QualixAMI": "ami-af4333cf",
"ESAMI": "ami-ecc9898c",
"NatAMI": "ami-004b0f60",
"QSAMI":"ami-7f2e031f"
"QSAMI":"ami-32320452"
},
"us-west-2": {
"QualixAMI": "ami-d2c924b2",
"ESAMI": "ami-3f72bc5f",
"NatAMI": "ami-a275b1c2",
"QSAMI":"ami-48b4bf31"
"QSAMI":"ami-47897a3f"
},
"ap-south-1": {
"QualixAMI": "ami-95cda6fa",
"ESAMI": "ami-2b265344",
"NatAMI": "ami-e2b9d38d",
"QSAMI":"ami-6695ea09"
"QSAMI":"ami-6af0b705"
},
"ap-northeast-2": {
"QualixAMI": "ami-c74789a9",
"ESAMI": "ami-6017dd0e",
"NatAMI": "ami-d14388bf",
"QSAMI":"ami-68b26d06"
"QSAMI":"ami-073be069"
},
"ap-southeast-1": {
"QualixAMI": "ami-f068a193",
"ESAMI": "ami-3c65ba5f",
"NatAMI": "ami-a79b49c4",
"QSAMI":"ami-5d2fad3e"
"QSAMI":"ami-1c61147f"
},
"ap-southeast-2": {
"QualixAMI": "ami-fedafc9d",
"ESAMI": "ami-cdb085ae",
"NatAMI": "ami-53371f30",
"QSAMI":"ami-5d2fad3e"
"QSAMI":"ami-663bdc04"
},
"ap-northeast-1": {
"QualixAMI": "ami-eec1c380",
"ESAMI": "ami-e43bff85",
"NatAMI": "ami-2443b745",
"QSAMI":"ami-26777c41"
"QSAMI":"ami-de8d40b8"
},
"eu-central-1": {
"QualixAMI": "ami-9bf712f4",
"ESAMI": "ami-69dd2a06",
"NatAMI": "ami-5825cd37",
"QSAMI":"ami-9fc86ff0"
"QSAMI":"ami-29fd4b46"
},
"sa-east-1": {
"QualixAMI": "ami-26b93b4a",
"ESAMI": "ami-1ba23277",
"NatAMI": "ami-9336bcff",
"QSAMI":"ami-76147f1a"
"QSAMI":"ami-1d364b71"
}
},
"AZFromRegion": {
Expand Down
59 changes: 24 additions & 35 deletions cloudformation/2_EC2_EX_No_VPN.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,19 @@
"ESInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"NetworkInterfaces": [ {
"AssociatePublicIpAddress": "true",
"DeviceIndex": "0",
"SubnetId": {
"Ref": "ESInstanceSN"
},
"GroupSet": [{
"Ref": "SG1id"
}]
}],
"IamInstanceProfile": {
"Ref": "ESInstanceProfile"
},
"SubnetId": {
"Ref": "ESInstanceSN"
},
"KeyName": {
"Ref": "KeyPair"
},
Expand All @@ -133,10 +140,7 @@
"ImageId": {
"Ref": "ESAMI"
},
"InstanceType": { "Ref": "InstanceSize" },
"SecurityGroupIds": [{
"Ref": "SG1id"
}],
"InstanceType": { "Ref": "InstanceSize" },
"UserData": {
"Fn::Base64": {
"Fn::Join": ["",
Expand Down Expand Up @@ -179,22 +183,27 @@
"ESInstance2": {
"Type": "AWS::EC2::Instance",
"Properties": {
"NetworkInterfaces": [{
"AssociatePublicIpAddress": "true",
"DeviceIndex": "0",
"SubnetId": {
"Ref": "ESInstanceSN"
},
"GroupSet": [{
"Ref": "SG1id"
}]

}],
"IamInstanceProfile": {
"Ref": "ESInstance2Profile"
},
"SubnetId": {
"Ref": "ESInstanceSN"
},
},
"KeyName": {
"Ref": "KeyPair"
},
"ImageId": {
"Ref": "ESAMI"
},
"InstanceType": { "Ref": "InstanceSize" },
"SecurityGroupIds": [{
"Ref": "SG1id"
}],
"UserData": {
"Fn::Base64": {
"Fn::Join": ["",
Expand Down Expand Up @@ -279,26 +288,6 @@
}]
}
},
"ESInstanceEIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
"InstanceId": {
"Ref": "ESInstance"
},
"Domain": ""
},
"DependsOn": "ESInstance"
},
"ESInstance2EIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
"InstanceId": {
"Ref": "ESInstance2"
},
"Domain": "vpc"
},
"DependsOn": "ESInstance2"
},
"QualixInstanceEIP": {
"Type": "AWS::EC2::EIP",
"Properties": {
Expand Down Expand Up @@ -329,4 +318,4 @@
}
}
}
}
}
8 changes: 7 additions & 1 deletion drivers/aws_shell/src/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def PrepareConnectivity(self, context, request, cancellation_context):
return self.aws_shell.prepare_connectivity(context, request, cancellation_context)

def CleanupConnectivity(self, context, request):
return self.aws_shell.cleanup_connectivity(context)
return self.aws_shell.cleanup_connectivity(context, request)

def GetApplicationPorts(self, context, ports):
return self.aws_shell.get_application_ports(context)
Expand All @@ -60,3 +60,9 @@ def get_inventory(self, context):

def GetAccessKey(self, context, ports):
return self.aws_shell.get_access_key(context)

def SetAppSecurityGroups(self, context, request):
return self.aws_shell.set_app_security_groups(context, request)

def GetVmDetails(self, context, ports):
return self.aws_shell.get_vm_details(context)
4 changes: 3 additions & 1 deletion drivers/aws_shell/src/drivermetadata.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Driver Description="This driver orchestrate all the command that will be executed on AWS" MainClass="driver.AWSShellDriver" Name="AWS Shell Driver" Version="1.4.0">
<Driver Description="This driver orchestrate all the command that will be executed on AWS" MainClass="driver.AWSShellDriver" Name="AWS Shell Driver" Version="2.0.0">
<Layout>
<Category Name="Deployment">
<Command Description="" DisplayName="Deploy From AMI" EnableCancellation="true" Name="deploy_ami" Tags="allow_unreserved" />
Expand All @@ -14,6 +14,8 @@
<Command Description="" DisplayName="Delete VM Only" Name="destroy_vm_only" Tags="remote_app_management,allow_shared" />
<Command Description="" DisplayName="GetAccessKey" Name="GetAccessKey" Tags="remote_app_management" />
<Command Description="" DisplayName="Deploy" Name="Deploy" Tags="allow_unreserved" />
<Command Description="" DisplayName="Set App Security Groups" Name="SetAppSecurityGroups" Tags="allow_unreserved" />
<Command Description="" DisplayName="Get VmDetails" Name="GetVmDetails" Tags="allow_unreserved,remote_app_management" />
</Category>

<Category Name="Power">
Expand Down
4 changes: 2 additions & 2 deletions drivers/aws_shell/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cloudshell-automation-api>=8.0.0.0,<8.1.0.0
cloudshell-automation-api>=8.2.0.0,<8.3.0.0
cloudshell-shell-core>=3.1.0,<3.2.0
cloudshell-cp-aws>=1.4.0,<1.5.0
cloudshell-cp-aws>=2.0.0,<2.1.0
jsonpickle==0.9.3
40 changes: 22 additions & 18 deletions drivers/aws_shellPackage/DataModel/datamodel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo Description="Ports and protocol to open outbound traffic from inside of the sandbox. The syntax is port[single/range]:protocol [tcp(default)/udp] with semi-colon separation, for example: 80;443:tcp;200-220:udp." IsReadOnly="false" Name="Outbound Ports" Type="String">
<Rules>
<Rule Name="Configuration" />
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo DefaultValue="false" Description="If set to False the deployment will not wait for the VM to get an ip" IsReadOnly="false" Name="Wait for IP" Type="Boolean">
<Rules>
<Rule Name="Configuration" />
Expand Down Expand Up @@ -138,25 +132,31 @@
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo DefaultValue="true" Name="Allow all Sandbox Traffic" Description="Whether an app should allow inbound traffic from all other apps in the sandbox. If set to false, access from specific apps or subnets can be defined by an API call." IsReadOnly="false" Type="Boolean">
<Rules>
<Rule Name="Configuration" />
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo DefaultValue="" Description="Reserved networks that will be excluded when allocating Sandbox networks. Should include at least the management network. The syntax is comma separated CIDRs. For example: 10.0.0.0/24, 10.1.0.0/16, 172.31.0.0/24." IsReadOnly="false" Name="Networks In Use" Type="String">
<Rules>
<Rule Name="Configuration" />
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo DefaultValue="False" Description="Requests a public IP address from Amazon's public IP address pool, to make your instance reachable from the internet. In most cases the public IP address is associated with the instance until it's stopped or terminated, after which it's no longer available for you to use. If you require a persistent public IP use an Elastic IP address instead." IsReadOnly="false" Name="Add Public IP" Type="Boolean">
<AttributeInfo DefaultValue="" Description="" IsReadOnly="false" Name="Public IP" Type="String">
<Rules>
<Rule Name="Configuration" />
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo DefaultValue="False" Description="Allocates an Elastic IP address to the instance. An Elastic IP is a static public IP address, which is reachable from the internet. Please enter the specific Elastic IP you want to associate with your instance. If kept empty no Elastic IP will be associated with the instance. Note that this value should be filled in for the app in the environment and not in the app catalog. For example 52.203.236.131." IsReadOnly="false" Name="Allocate Elastic IP" Type="Boolean">
<AttributeInfo DefaultValue="" Name="Public IP Options" Type="String" Description="Select whether to create a public IP. If the VM will be connected to more than one subnet, and public IP is required in at least one of them, the 'elastic IPs' option ought to be selected." IsReadOnly="false">
<Rules>
<Rule Name="Configuration" />
<Rule Name="Setting" />
</Rules>
</AttributeInfo>
<AttributeInfo DefaultValue="" Description="" IsReadOnly="false" Name="Public IP" Type="String">
<AttributeInfo DefaultValue="5" Description="Reserved IP addresses are not available to use, and cannot be assigned to an instance." IsReadOnly="false" Name="Reserved IPs in Subnet" Type="Numeric">
<Rules>
<Rule Name="Configuration" />
<Rule Name="Setting" />
Expand Down Expand Up @@ -214,6 +214,9 @@
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Instance Type">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Reserved IPs in Subnet">
<AllowedValues />
</AttachedAttribute>
</AttachedAttributes>
<AttributeValues>
<AttributeValue Name="Region" Value="us-east-1" />
Expand Down Expand Up @@ -260,6 +263,9 @@
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="AWS AMI Id" UserInput="true">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Allow all Sandbox Traffic" UserInput="true">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Instance Type" UserInput="true">
<AllowedValues />
</AttachedAttribute>
Expand All @@ -282,9 +288,6 @@
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Inbound Ports" UserInput="true">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Outbound Ports" UserInput="true">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Wait for IP" UserInput="false">
<AllowedValues />
</AttachedAttribute>
Expand All @@ -297,11 +300,12 @@
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Wait for Credentials" UserInput="false">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Add Public IP" UserInput="true">
<AllowedValues />
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Allocate Elastic IP" UserInput="true">
<AllowedValues />
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Public IP Options" UserInput="true">
<AllowedValues>
<AllowedValue>No Public IP</AllowedValue>
<AllowedValue>Public IP (single subnet)</AllowedValue>
<AllowedValue>Elastic IPs</AllowedValue>
</AllowedValues>
</AttachedAttribute>
<AttachedAttribute IsLocal="true" IsOverridable="true" Name="Root Volume Name" UserInput="false">
<AllowedValues />
Expand All @@ -311,8 +315,8 @@
<AttributeValue Name="Autoload" Value="true"/>
<AttributeValue Name="Wait for IP" Value="false"/>
<AttributeValue Name="Wait for Credentials" Value="true"/>
<AttributeValue Name="Add Public IP" Value="true"/>
<AttributeValue Name="Storage Type" Value="auto"/>
<AttributeValue Name="Public IP Options" Value="No Public IP"/>
</AttributeValues>
<ParentModels />
<Drivers />
Expand Down
2 changes: 1 addition & 1 deletion drivers/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
2.0.0
5 changes: 5 additions & 0 deletions install_to_drop.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
call kill_python.bat
cd package
del /Q /S cloudshell\cp\aws\*.pyc
"C:\TFS\QualiSystems\Trunk\Drop\TestShell\ExecutionServer\python\2.7.10\python.exe" setup.py develop
cd ..\
4 changes: 3 additions & 1 deletion kill_python.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@echo off
taskkill /im python.exe /f
::taskkill /im python.exe /f
wmic Path win32_process Where "CommandLine Like '%%\\ExecutionServer\\%%python.exe%%'" Call Terminate
wmic Path win32_process Where "CommandLine Like '%%\\ProgramData\\QualiSystems\\%%python.exe%%'" Call Terminate
Empty file added package/__init__.py
Empty file.

0 comments on commit 3d33c15

Please sign in to comment.