зеркало из https://github.com/microsoft/CCF.git
Remove VM-specific dependency setup (#6412)
This commit is contained in:
Родитель
f35202903b
Коммит
56b346e5be
|
@ -1,6 +1,3 @@
|
|||
# Running CCF on a virtual machine
|
||||
The `setup_vm` directory contains Ansible playbooks that allow setting up a VM or container with the necessary dependencies to build or run CCF applications.
|
||||
|
||||
This folder contains two separate ways of setting up a development environment for CCF itself and apps.
|
||||
|
||||
1. [azure_vm](./azure_vm/README.md) provides an opinionated way of creating a Virtual Machine on Azure and install CCF for you by cloud-init.
|
||||
2. `setup_vm` assumes that a bare environment is already available (VM or container) and provides Ansible scripts to setup the development environment by either cloning this repository or installing the CCF Debian package
|
||||
See https://microsoft.github.io/CCF/main/build_apps/install_bin.html for more detail.
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# Creating a Virtual Machine in Azure to run CCF
|
||||
|
||||
This guide is here to give you the bare minimum to get started with CCF. It will walk you through the steps to create a virtual machine in Azure and install CCF on it.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You must run this from a bash terminal that you have already logged in to Azure with. If you have not done this, please follow the instructions [here](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
|
||||
|
||||
## Create a Virtual Machine
|
||||
|
||||
Run the following script :
|
||||
|
||||
```bash
|
||||
./getting_started/azure_vm/install_ccf_on_azure_vm.sh
|
||||
```
|
|
@ -1,42 +0,0 @@
|
|||
#cloud-config
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
apt:
|
||||
sources:
|
||||
docker.list:
|
||||
source: deb [arch=amd64] https://download.docker.com/linux/ubuntu $RELEASE stable
|
||||
keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||
|
||||
packages:
|
||||
- apt-transport-https
|
||||
- ca-certificates
|
||||
- curl
|
||||
- gnupg-agent
|
||||
- software-properties-common
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- containerd.io
|
||||
- git
|
||||
- jq
|
||||
|
||||
# Enable ipv4 forwarding, required on CIS hardened machines
|
||||
write_files:
|
||||
- path: /etc/sysctl.d/enabled_ipv4_forwarding.conf
|
||||
content: |
|
||||
net.ipv4.conf.all.forwarding=1
|
||||
|
||||
# create the docker group
|
||||
groups:
|
||||
- docker
|
||||
|
||||
# Add default auto created user to docker group
|
||||
system_info:
|
||||
default_user:
|
||||
groups: [docker]
|
||||
|
||||
runcmd:
|
||||
- cd /home/azureuser && git clone https://github.com/microsoft/CCF.git ccf-install -b release/2.x
|
||||
- sudo -u azureuser /home/azureuser/ccf-install/getting_started/setup_vm/run.sh /home/azureuser/ccf-install/getting_started/setup_vm/app-run.yml
|
||||
- export CCF_VERSION=$(curl -ILs -o /dev/null -w %{url_effective} https://github.com/microsoft/CCF/releases/latest | sed 's/^.*ccf-//')
|
||||
- wget https://github.com/microsoft/CCF/releases/download/ccf-${CCF_VERSION}/ccf_${CCF_VERSION}_amd64.deb
|
||||
- apt install /home/azureuser/ccf_${CCF_VERSION}_amd64.deb -y
|
|
@ -1,38 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the Apache 2.0 License.
|
||||
|
||||
# !!! These are defaults and you can change these if you wish !!!
|
||||
resourceGroup=rg_ccf_demo
|
||||
vm_name=ccfdemo
|
||||
location=westeurope
|
||||
# This is the smallest VM, you may wish to change this.
|
||||
vm_size=Standard_DC1s_v2
|
||||
vnetName=ccf
|
||||
subnetName=nodes
|
||||
vnetAddressPrefix=10.0.0.0/16
|
||||
ccfAddressPrefix=10.0.0.0/24
|
||||
|
||||
az group create --name $resourceGroup --location $location
|
||||
|
||||
az network vnet create \
|
||||
--name $vnetName \
|
||||
--resource-group $resourceGroup \
|
||||
--address-prefixes $vnetAddressPrefix \
|
||||
--subnet-name $subnetName \
|
||||
--subnet-prefixes $ccfAddressPrefix
|
||||
|
||||
# Automatically generates a ssh key if one is not present
|
||||
# https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-ssh-keys-detailed#generate-keys-automatically-during-deployment
|
||||
az vm create \
|
||||
--resource-group $resourceGroup \
|
||||
--name $vm_name \
|
||||
--image canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:20.04.202210180 \
|
||||
--vnet-name $vnetName \
|
||||
--subnet $subnetName \
|
||||
--size $vm_size \
|
||||
--public-ip-sku Standard \
|
||||
--admin-username azureuser \
|
||||
--custom-data ccf-cloudinit.yml \
|
||||
--generate-ssh-keys \
|
||||
--output json
|
Загрузка…
Ссылка в новой задаче