diff --git a/lotus-land-story/Rakefile b/lotus-land-story/Rakefile index eb012d7..cae93c9 100644 --- a/lotus-land-story/Rakefile +++ b/lotus-land-story/Rakefile @@ -1,7 +1,26 @@ +require "open3" require "yaml" DOMAIN = ENV.fetch("LOTUS_LAND_STORY_DOMAIN") +task bootstrap: "pip:sync" + +namespace :pip do + task :sync => "requirements.txt" do + sh "pip-sync requirements.txt" + end + + task :upgrade do + out, _ = Open3.capture2e("pip-compile --upgrade --resolver=backtracking requirements.in") + File.write("requirements.txt", out) + end + + file "requirements.txt" => "requirements.in" do |t| + out, _ = Open3.capture2e("pip-compile --resolver=backtracking requirements.in") + File.write(t.name, out) + end +end + task terraform: "terraform.tfvars" do sh "terraform apply" end diff --git a/lotus-land-story/requirements.in b/lotus-land-story/requirements.in new file mode 100644 index 0000000..2abe36a --- /dev/null +++ b/lotus-land-story/requirements.in @@ -0,0 +1,4 @@ +ansible +netaddr +pip-tools +psycopg2 diff --git a/lotus-land-story/requirements.txt b/lotus-land-story/requirements.txt new file mode 100644 index 0000000..5bb1d7e --- /dev/null +++ b/lotus-land-story/requirements.txt @@ -0,0 +1,50 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --resolver=backtracking requirements.in +# +ansible==7.4.0 + # via -r requirements.in +ansible-core==2.14.4 + # via ansible +build==0.10.0 + # via pip-tools +cffi==1.15.1 + # via cryptography +click==8.1.3 + # via pip-tools +cryptography==40.0.1 + # via ansible-core +jinja2==3.1.2 + # via ansible-core +markupsafe==2.1.2 + # via jinja2 +netaddr==0.8.0 + # via -r requirements.in +packaging==23.0 + # via + # ansible-core + # build +pip-tools==6.12.3 + # via -r requirements.in +psycopg2==2.9.6 + # via -r requirements.in +pycparser==2.21 + # via cffi +pyproject-hooks==1.0.0 + # via build +pyyaml==6.0 + # via ansible-core +resolvelib==0.8.1 + # via ansible-core +tomli==2.0.1 + # via + # build + # pyproject-hooks +wheel==0.40.0 + # via pip-tools + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools