2023-08-15 Deploy service - Graph Handler

From Izara Wiki
Revision as of 15:16, 18 August 2021 by Sven the Barbarian (talk | contribs) (Created page with "= Deploy instructions = # Clone project # cd \rbac\resource >> npm install # cd \rbac\app >> npm install # modify config/serverless.config.yml #* iz_serviceName(optional) #*...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Deploy instructions

  1. Clone project
  2. cd \rbac\resource >> npm install
  3. cd \rbac\app >> npm install
  4. modify config/serverless.config.yml
    • iz_serviceName(optional)
    • iz_stage (optional)
    • iz_region (optional)
    • iz_accountId (optional)
    • iz_logLevel (optional)
  5. modify config/serverless.config.yml : For resources
    1. iz_DefaultKeyPairName: neo4jSharedKeyName
      • require existing key pair and make sure have private key pair installed on local computer
      • #Create key pair
    2. iz_ImageId: ami-12xxxx33xxxxxx
    3. iz_VPCCidrBlock: 172.16.0.0/16
      • private IP range for VPC
    4. iz_Subnet1CidrBlock:172.16.10.0/24
      • private IP range for subnet
    5. iz_Subnet1Public: true
      • custom value, eg: true/false
  6. cd \permission-handler\resource
  7. serverless deploy
  8. After deploy resource, need to connect with neo4j instance for setup user and password
  9. modify config/serverless.config.yml: For app
    1. iz_neo4jPort: bolt://172.16.10.249:7687
    2. iz_neo4jUser: neo4j
      • username will set when first time connect with instance
    3. iz_neo4jPassword:neo4j2
      • password will set when first time connect with instance
    4. iz_securityGroupIds: sg-xxxxxxxxxxx
      • get from Instance page : EC2> Instances > I-xxx > tab: Security > Security groups > copy sg-xxxx
    5. iz_subnetIds1a: subnet-xxxxxxxxxxxxxxx
      • get from Service VPC > Subnets
      • and get Subnet ID in VPC that instance exist
      • Vpc subnet ids.png
  10. cd \permission-handler\app
  11. serverless deploy

Create key pair

  1. in terminal
  2. export KEY_NAME="Neo4j-AWSMarketplace-Key”
  3. aws ec2 create-key-pair --key-name $KEY_NAME --query 'KeyMaterial'--output text > $KEY_NAME.pem

Aws keypair.jpg

Find EC2 image ami

  1. in AWS console
  2. EC2 -> Images -> AMIs
  3. click Change Owned by me to Public images Search "neo4j-community"
  4. Select one with "Owner" field showing this number: 385155106615, copy AMI ID
    • Note: should select a different image-id ami from existing instance to avoid crash

File:Ec2 neo4j ami images.jpg