bitovi/Deploy Ollama and Open WebUI
Deploy your own LLM (large language model) like llama3 with a web based UI to an EC2 instance.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Feb 6, 2025
- License
- MIT
Pinned Snippet
uses: bitovi/github-actions-deploy-ollama@8f8149c4e81f93e93e8f591264083d611870871f # v0.2.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| disable_signup | Disable user signup for the application. | no | false |
| ollama_models | Comma separated list of models to download automatically. | no | "" |
| aws_access_key_id | AWS access key ID | no | — |
| aws_secret_access_key | AWS secret access key | no | — |
| aws_session_token | AWS session token | no | — |
| aws_default_region | AWS default region | no | us-east-1 |
| aws_resource_identifier | Set to override the AWS resource identifier for the deployment. Defaults to `${org}-{repo}-{branch}`. Use with destroy to destroy specific resources. | no | — |
| aws_additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| checkout | Specifies if this action should checkout the code | no | true |
| tf_stack_destroy | Whether to destroy the Terraform stack on completion. | no | false |
| tf_state_file_name | The name of the Terraform state file. | yes | — |
| tf_state_file_name_append | Append a suffix to the state file name to allow unique state management. | no | — |
| tf_state_bucket | The S3 bucket name where the Terraform state file will be stored. | yes | — |
| tf_state_bucket_destroy | Whether to destroy the state bucket on stack completion. | no | — |
| ansible_ssh_to_private_ip | Make Ansible connect to the private IP of the instance. Only usefull if using a hosted runner in the same network. | no | — |
| ansible_start_docker_timeout | Ammount of time in seconds it takes Ansible to mark as failed the startup of docker. Defaults to `300` | no | — |
| env_aws_secret | Secret name to pull env variables from AWS Secret Manager, could be a comma separated list, read in order. Expected JSON content. | no | — |
| env_repo | File containing environment variables to be used with the app | no | — |
| env_ghs | GitHub Secret Name containing `.env` file style to be used with the app. | no | — |
| env_ghv | GitHub Variable Name containing `.env` file style to be used with the app. | no | — |
| aws_ec2_instance_create | Define if an EC2 instance should be created | no | true |
| aws_ec2_ami_filter | AWS AMI Filter string. Will be used to lookup for lates image based on the string. Defaults to `ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*`. | no | — |
| aws_ec2_ami_owner | Owner of AWS AMI image. This ensures the provider is the one we are looking for. Defaults to `099720109477`, Canonical (Ubuntu). | no | — |
| aws_ec2_ami_id | AWS AMI ID. Will default to lookup for latest image of the `aws_ec2_ami_filter` string. This will override `aws_ec2_ami_filter` lookup. | no | — |
| aws_ec2_ami_update | Set this to true if you want to recreate the EC2 instance if there is a newer version of the AMI. | no | — |
| aws_ec2_iam_instance_profile | The AWS IAM instance profile to use for the EC2 instance | no | — |
| aws_ec2_instance_type | Type of AWS EC2 instance to deploy. | no | inf1.xlarge |
| aws_ec2_instance_root_vol_size | Define the volume size (in GiB) for the root volume on the AWS Instance. | no | 20 |
| aws_ec2_instance_root_vol_preserve | Set this to true to avoid deletion of root volume on termination. Defaults to false. | no | — |
| aws_ec2_security_group_name | The name of the EC2 security group | no | — |
| aws_ec2_create_keypair_sm | Create a key pair using AWS Secrets Manager. | no | — |
| aws_ec2_instance_public_ip | Add a public IP to the instance or not. (Not an Elastic IP) | no | true |
| aws_ec2_port_list | List of ports to be enabled as an ingress rule in the EC2 SG, in a [xx,yy] format - Not the ELB | no | — |
| aws_ec2_additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| aws_vpc_create | Define if a VPC should be created | no | — |
| aws_vpc_name | Set a specific name for the VPC | no | — |
| aws_vpc_cidr_block | Define Base CIDR block which is divided into subnet CIDR blocks. Defaults to 10.0.0.0/16. | no | — |
| aws_vpc_public_subnets | Comma separated list of public subnets. Defaults to 10.10.110.0/24 | no | — |
| aws_vpc_private_subnets | Comma separated list of private subnets. If none, none will be created. | no | — |
| aws_vpc_availability_zones | Comma separated list of availability zones. Defaults to `aws_default_region. | no | — |
| aws_vpc_id | AWS VPC ID. Accepts `vpc-###` values. | no | — |
| aws_vpc_subnet_id | Specify a Subnet to be used with the instance. If none provided, will pick one. | no | — |
| aws_vpc_enable_nat_gateway | Enables NAT gateway | no | — |
| aws_vpc_single_nat_gateway | Creates only one NAT gateway | no | — |
| aws_vpc_external_nat_ip_ids | Comma separated list of IP IDS to reuse in the NAT gateways | no | — |
| aws_vpc_additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| aws_r53_enable | Enables the usage of Route53 to manage DNS records. | no | — |
| aws_r53_domain_name | Define the root domain name for the application. e.g. app.com | no | — |
| aws_r53_sub_domain_name | Define the sub-domain part of the URL. Defaults to `${org}-${repo}-{branch}` | — | — |
| aws_r53_root_domain_deploy | Deploy to root domain. Will generate two DNS recrods, one for root, another for www | no | — |
| aws_r53_enable_cert | Makes the application use a certificate by enabling a certificate lookup. | no | true |
| aws_r53_cert_arn | Define the certificate ARN to use for the application | no | — |
| aws_r53_create_root_cert | Generates and manage the root cert for the application | no | — |
| aws_r53_create_sub_cert | Generates and manage the sub-domain certificate for the application | no | — |
| aws_r53_additional_tags | A JSON object of additional tags that will be included on created resources. Example: `{"key1": "value1", "key2": "value2"}` | no | — |
| docker_install | Define if docker should be installed. After this, docker-compose up will be excecuted. | no | true |
| docker_remove_orphans | Toggle --remove-orphans flag. Defaults to false. | no | — |
| docker_full_cleanup | Set to true to run docker-compose down and docker system prune --all --force --volumes after. | no | — |
| docker_repo_app_directory_cleanup | Will generate a timestamped compressed file and delete the app repo directory. | no | — |
| docker_cloudwatch_enable | Toggle cloudwatch creation for Docker containers. | no | true |
| docker_cloudwatch_lg_name | Log group name. Will default to aws_identifier if none. | no | — |
| docker_cloudwatch_skip_destroy | Toggle deletion or not when destroying the stack. | no | — |
| docker_cloudwatch_retention_days | Number of days to retain logs. 0 to never expire. | no | — |
Outputs
| name | description |
|---|---|
| aws_vpc_id | The selected VPC ID used. |
| vm_url | The URL of the generated app |
| instance_endpoint | The URL of the generated ec2 instance |
| ec2_sg_id | SG ID for the EC2 instance |