Everything as Code: The New Software Development and Delivery Workflow
This talks seeks to share knowledge on software engineering methodology that promotes collaboration, quality and speed in delivering business products.
and operational paradigms in achieving business goals. This talk models an implementation for a startup developing an online presence for her consultancy service.
Repositories and Teams. Define the Vagrantfile. Describe the Configuration. Test and Provision the Environment. Stores in Version Control System.
"${var.github_token}" organization = "${var.github_organization}" } # Create Repositories resource "github_repository" "samfil_technohub_landingpage_app" { name = "samfil-technohub-landingpage-app" description = "The Codebase for Samfil Technohub Landing Page Application" has_issues = true has_projects = true default_branch = "development" } # Create Teams resource "github_team" "samfil_technohub_landingpage_dev_team" { name = "${var.project}-dev-team" description = "Samfil Technohub Landing Page Development Team" privacy = "closed" } # Add Users to Teams # Samfil Technohub Landing Page Dev Team Members resource "github_team_membership" "samfil_technohub_landingpage_dev_team_members" { team_id = "${github_team.samfil_technohub_landingpage_dev_team.id}" count = "${length(var.developer_users)}" username = "${element(var.developer_users, count.index)}" role = "${element(var.developer_users, count.index) == "knoxknot" ? "maintainer" : "member"}" } # Assign a Repository to a Team resource "github_team_repository" "dev_team_repo" { team_id = "${github_team.samfil_technohub_landingpage_dev_team.id}" repository = "${github_repository.samfil_technohub_landingpage_app.id}" permission = "push" } Example Code Using github as the hosting service for git versioning, the terraform file creates a repository, team and adds a user and repository to the team.
config.vm.box = "ubuntu-xenial64" # ssh settings config.ssh.username = "vagrant" config.ssh.private_key_path = ["~/.ssh/server_key", "~/.vagrant.d/insecure_private_key"] config.ssh.insert_key = false # vm provider config.vm.provider "virtualbox" do |vb| vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] vb.cpus = "1" vb.memory = "1024" end #synchronize folders between host and guest machine config.vm.synced_folder '.', '/usr/share/nginx/html' # upload public key into the machine config.vm.provision "file", source: "~/.ssh/server_key.pub", destination: "~/.ssh/authorized_keys" # configure the development server config.vm.define "development" do |development| development.vm.hostname = "development" development.vm.network "private_network", ip: "192.168.255.9" development.vm.provision :ansible do |ansible| ansible.inventory_path = "configuration/hosts" ansible.playbook = "configuration/server.yml" end development.vm.provision "shell", inline: <<-SHELL echo 'Running Serverspec Tests...' cd /usr/share/nginx/html/configuration/serverspec rake -v -t SHELL end end Example Code Defines the specification of the development machine with vagrant, configures the machine with ansible and tests that the machine is desired with serverspec.
Access Policy. Deploy Monitoring and Compliance. Provision a Production Environment. Configure Domain Name Service. Actively Communicates with Dev Team.